### Question:
Minimap implements Image { @Override public void prepare() { if (surface == null) { throw new LionEngineException(ERROR_SURFACE); } final Graphic g = surface.createGraphic(); final int v = map.getInTileHeight(); final int h = map.getInTileWidth(); for (int ty = 0; ty < v; ty++) { for (int tx = 0; tx < h; tx++) { final Tile tile = map.getTile(tx, ty); final ColorRgba color = getTileColor(tile); if (!NO_TILE.equals(color)) { g.setColor(color); g.drawRect(tx, v - ty - 1, 0, 0, false); } } } g.dispose(); } Minimap(MapTile map); void loadPixelConfig(Media config); void automaticColor(); void automaticColor(Media config); @Override void load(); @Override void prepare(); @Override void dispose(); @Override void render(Graphic g); @Override void setOrigin(Origin origin); @Override void setLocation(double x, double y); @Override void setLocation(Viewer viewer, Localizable localizable); @Override double getX(); @Override double getY(); @Override int getWidth(); @Override int getHeight(); @Override ImageBuffer getSurface(); @Override boolean isLoaded();  }### Answer:
@Test void testNullPrepare() { final Minimap minimap = new Minimap(new MapTileGame()); assertThrows(() -> minimap.prepare(), Minimap.ERROR_SURFACE); }