how to test magnetic sensor