### Question:
BackgroundController implements Observer { public BackgroundController(MapModel mapModel, BackgroundModel model) { myMapModel = mapModel; myModel = model; myTileBuilder = new TileGeometry.Builder<ScreenPosition>(); myTileBuilder.setDivider(null); myTileBuilder.setParent(null); myTileBuilder.setImageManager(new ImageManager(null, new SingletonImageProvider( "/images/BMNG_world.topo.bathy.200405.3.2048x1024.jpg", Image.CompressionType.D3DFMT_DXT1))); getBackgroundGeometries(); myMapModel.addObserver(this); } BackgroundController(MapModel mapModel, BackgroundModel model); void close(); @Override void update(Observable o, Object arg);  }### Answer:
@SuppressWarnings("unused") @Test public void testBackgroundController() { MapModel mapModel = new MapModel(); mapModel.setHeightWidth(150, 300); mapModel.setViewport(new ScreenBoundingBox(new ScreenPosition(0d, 0d), new ScreenPosition(300, 150))); BackgroundModel model = new BackgroundModel(); new BackgroundController(mapModel, model); assertEquals(1, model.getGeometries().size()); TileGeometry geometry = model.getGeometries().iterator().next(); Vector3d upperLeft = ((ScreenBoundingBox)geometry.getBounds()).getUpperLeft().asVector3d(); Vector3d lowerRight = ((ScreenBoundingBox)geometry.getBounds()).getLowerRight().asVector3d(); assertEquals(0, (int)upperLeft.getX()); assertEquals(0, (int)upperLeft.getY()); assertEquals(150, (int)lowerRight.getY()); assertEquals(300, (int)lowerRight.getX()); assertEquals(1d, model.getGeometryScaleFactors().get(0), 0d); SingletonImageProvider provider = new SingletonImageProvider("/images/BMNG_world.topo.bathy.200405.3.2048x1024.jpg", Image.CompressionType.D3DFMT_DXT1); byte[] expected = provider.getImage(null).getByteBuffer().array(); byte[] actual = geometry.getImageManager().getImageProvider().getImage(null).getByteBuffer().array(); assertEquals(expected.length, actual.length); for (int i = 0; i < expected.length; i++) { assertEquals(expected[i], actual[i]); } }