private void commonCreateTileFromMetaTileTest(Color[][] colors, RenderedImage metaTileImage)
throws Exception {
BoundingBox boundingBox = new BoundingBox(0, 0, 180, 90);
int metaHeight = 2;
int metaWidth = 2;
GridSubset grid =
GridSubsetFactory.createGridSubSet(
gridSetBroker.getWorldEpsg4326(), boundingBox, 0, 21);
long[] gridPos = {0, 0, 0};
MetaTile metaTile =
new MetaTile(grid, ImageMime.png, null, gridPos, metaWidth, metaHeight, null);
metaTile.setImage(metaTileImage);
int width = metaTile.getMetaTileWidth();
int height = metaTile.getMetaTileHeight();
checkImageBorderSameColor(metaTile.createTile(0, 0, width, height), colors[0][0]);
checkImageBorderSameColor(metaTile.createTile(width, 0, width, height), colors[0][1]);
checkImageBorderSameColor(metaTile.createTile(0, height, width, height), colors[1][0]);
checkImageBorderSameColor(metaTile.createTile(width, height, width, height), colors[1][1]);
}