MosaicTileHandler { public void close() throws IOException { if (currentMacroTile != null) { writeNaNTiles(currentTile, null); finishProduct(); } currentTile = null; currentMacroTile = null; } MosaicTileHandler(MosaicGrid mosaicGrid); void handleTile(TileIndexWritable key, TileDataWritable data); void close();  }
@Test public void testProductWriting_NoTilesPresent_MacroTile_0_0() throws Exception { tileHandler = new DummyMosaicTileHandler(new MosaicGrid(3, 9, 2, true, 8, 0, null)); assertNull(tileHandler.createProduct); assertEquals(0, tileHandler.closeProduct); assertEquals(0, tileHandler.nanTiles.size()); assertEquals(0, tileHandler.dataTiles.size()); tileHandler.close(); assertNull(tileHandler.createProduct); assertEquals(0, tileHandler.closeProduct); assertEquals(0, tileHandler.nanTiles.size()); assertEquals(0, tileHandler.dataTiles.size()); }