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