ProductionSite extends Observable { public void setInputTemperature(TankSelector tank, float temperature) { if (temperature > SimulationConstants.MAX_TEMPERATURE) { throw new IllegalArgumentException("Tank input temperature must not be grater than " + SimulationConstants.MAX_TEMPERATURE); } if (temperature < SimulationConstants.MIN_TEMPERATURE) { throw new IllegalArgumentException("Tank input temperature must not be smaller than " + SimulationConstants.MIN_TEMPERATURE); } inputTemperature.put(tank, temperature); setChanged(); notifyObservers(); } ProductionSite(); float getInputTemperature(TankSelector tank); void setInputTemperature(TankSelector tank, float temperature); Tank getUpperTank(TankSelector tank); MixTank getMixTank(); synchronized void reset();  }
@Test(expected = IllegalArgumentException.class) public void testTooLowInputTemperature() { prodSite.setInputTemperature(TankSelector.MIX, SimulationConstants.MIN_TEMPERATURE - 1); }
@Test(expected = IllegalArgumentException.class) public void testTooHighInputTemperature() { prodSite.setInputTemperature(TankSelector.MIX, SimulationConstants.MAX_TEMPERATURE + 1); }