Changes from review and added test for SensorResource