### Question:
ScaledImageController implements Observer { public void close() { myModel.deleteObserver(this); } ScaledImageController(ScaledImageModel model); void close(); @Override void update(Observable o, Object arg);  }### Answer:
@Test public void testClose() { ScaledImageModel model = new ScaledImageModel(); ScaledImageController controller = new ScaledImageController(model); assertEquals(1, model.countObservers()); controller.close(); assertEquals(0, model.countObservers()); }