@Test
public void testDefaultsOne() throws Exception {

	Envelope googleEnvelope = new Envelope(10000, 10010, 5000, 5010);
	// back-transform envelope to latlon
	Crs google = geoService.getCrs2(MERCATOR);
	Crs latlon = geoService.getCrs2(LONLAT);
	Envelope latlonEnvelope = geoService.transform(JTS.toGeometry(googleEnvelope), google, latlon)
			.getEnvelopeInternal();
	// back-transform scale to latlon
	double latlonScale = ZOOMED_IN_SCALE * googleEnvelope.getWidth() / latlonEnvelope.getWidth();
	// paint with re-projection (affine is fine for now...:-)
	List<RasterTile> tiles = defaultWms.paint(latlon, latlonEnvelope, latlonScale);
	Assert.assertEquals(1, tiles.size());
	RasterTile tile = tiles.get(0);
	Assert.assertEquals("http://apps.geomajas.org/geoserver/wms?SERVICE=WMS&layers=bluemarble&WIDTH=512&HEIGHT"
			+ "=512&bbox=-20,-28,12,4&format=image/png&version=1.1.1&srs=EPSG%3A4326&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(-45.0, tile.getBounds().getY(), DELTA);
	Assert.assertEquals(357.0, tile.getBounds().getHeight(), DELTA);
	Assert.assertEquals(357.0, tile.getBounds().getWidth(), DELTA);
	// 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/png&version=1.1.1&srs=EPSG%3A4326&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);
}