### Question:
GaugeButtonModel extends DefaultButtonModel { public boolean areAllLightsOn() { return numberOfLightsOn() == lights.size(); } GaugeButtonModel(int numberOfLights); List<Light> lights(); void turnNextLightOn(); boolean areAllLightsOn(); void turnAllLightsOff();  }### Answer:
@Test public void areAllLightsOn() { assertFalse("Not all lights should be on", model.areAllLightsOn()); model.turnNextLightOn(); assertFalse("Not all lights should be on", model.areAllLightsOn()); model.turnNextLightOn(); assertFalse("Not all lights should be on", model.areAllLightsOn()); model.turnNextLightOn(); assertTrue("All lights should be on", model.areAllLightsOn()); }