// back-transform scale to latlon
double latlonScale = ZOOMED_IN_SCALE * googleEnvelope.getWidth() / latlonEnvelope.getWidth();
// paint with reprojection (affine is fine for now...:-)
List<RasterTile> tiles = wms.paint(latlon, latlonEnvelope, latlonScale);
Assert.assertEquals(1, tiles.size());
RasterTile tile = tiles.get(0);
// ZOOMED_IN_SCALE 1E-4 corresponds to level 4 with current algorithm !!!!
Assert.assertEquals("http://apps.geomajas.org/geoserver/wms?SERVICE=WMS&"
+ "layers=bluemarble&WIDTH=512&HEIGHT=512&"
+ "bbox=-20.032430835865227,-28.207099921352835,11.947593278789554,3.7729241933019466&"
+ "format=image/jpeg&version=1.1.1&srs=EPSG:4326&styles=&request=GetMap", tile.getUrl());
Assert.assertEquals(4, tile.getCode().getTileLevel());
Assert.assertEquals(5, tile.getCode().getX());
Assert.assertEquals(12, tile.getCode().getY());
Assert.assertEquals(-223.0, tile.getBounds().getX(), DELTA);
Assert.assertEquals(-42.0, tile.getBounds().getY(), DELTA);
Assert.assertEquals(356.0, tile.getBounds().getHeight(), DELTA);
Assert.assertEquals(356.0, tile.getBounds().getWidth(), DELTA);
}