AffineTransform w2s = RendererUtilities.worldToScreenTransform(mapExtent, screenSize);
GridCoverageRenderer renderer = new GridCoverageRenderer(googleMercator, mapExtent,
screenSize, w2s);
RasterSymbolizer rasterSymbolizer = new StyleBuilder().createRasterSymbolizer();
RenderedImage image = renderer.renderImage(worldReader, null, rasterSymbolizer, Interpolation.getInstance(Interpolation.INTERP_NEAREST),
Color.RED, 256, 256);
File reference = new File(
"src/test/resources/org/geotools/renderer/lite/gridcoverage2d/googleMercatorLargerThanWorld.png");
ImageAssert.assertEquals(reference, image, 0);
}