Improve the sensor unit test