### Question:
BackgroundOverlay implements Observer, Overlay { @Override public void close() { myController.close(); myModel.deleteObserver(this); } BackgroundOverlay(MapModel mapModel); @Override void close(); @Override void draw(Graphics graphics); @Override void update(Observable o, Object arg);  }### Answer:
@Test public void testClose() { MapModel mapModel = new MapModel(); mapModel.setHeightWidth(150, 300); mapModel.setViewport(new ScreenBoundingBox(new ScreenPosition(0d, 0d), new ScreenPosition(300, 150))); BackgroundOverlay overlay = new BackgroundOverlay(mapModel); assertEquals(1, mapModel.countObservers()); overlay.close(); assertEquals(0, mapModel.countObservers()); }