### Question:
GaugeButtonModel extends DefaultButtonModel { public void turnAllLightsOff() { for(Light light : lights) light.turnOff(); } GaugeButtonModel(int numberOfLights); List<Light> lights(); void turnNextLightOn(); boolean areAllLightsOn(); void turnAllLightsOff();  }### Answer:
@Test public void turnAllLightsOff() { model.turnNextLightOn(); model.turnNextLightOn(); model.turnNextLightOn(); model.turnAllLightsOff(); List<Light> lights = model.lights(); assertFalse("Light should be off", lights.get(0).isOn()); assertFalse("Light should be off", lights.get(1).isOn()); assertFalse("Light should be off", lights.get(2).isOn()); }