Add more unit tests for sensor