### Question:
GaugeButtonModel extends DefaultButtonModel { public List<Light> lights() { return lights; } GaugeButtonModel(int numberOfLights); List<Light> lights(); void turnNextLightOn(); boolean areAllLightsOn(); void turnAllLightsOff();  }### Answer:
@Test public void lightListIsNotNull() { List<Light> lights = model.lights(); assertNotNull("Light list should not be null", lights); }
@Test public void lightCountIsThree() { List<Light> lights = model.lights(); assertEquals("There should be 3 lights", 3, lights.size()); }
@Test public void lightsAreSequentiallyNumberedStartingWithZero() { List<Light> lights = model.lights(); assertEquals("Wrong light number", 0, lights.get(0).number()); assertEquals("Wrong light number", 1, lights.get(1).number()); assertEquals("Wrong light number", 2, lights.get(2).number()); }
@Test public void allLightsAreOffByDefault() { 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()); }