public void testInitiatingActuatorChangeFromSensorUpdate() throws SimulationContextException {
Simulation simulation = new Simulation(new SystemTimeTimeSource());
Room room = new Room();
HeatingController controller = new HeatingController();
ISensor sensor = new TemperatureSensor();
IActuator actuator = new HeatingActuator();
room.setContext(simulation.getContext());
simulation.getContext().setTemperature(0.0D);
simulation.getContext().setPreference("targetTemperature","21.5D");
controller.attachSensor(sensor);
controller.attachActuator(actuator);
Assert.assertTrue(actuator.getState() == IActuator.IDLE);
room.addSensor(sensor);
room.addController(controller);
room.addActuator(actuator);
controller.step();
Assert.assertTrue(actuator.getState() == IActuator.ACTIVE);
}