@Test
public void testReprojectOne() throws Exception {

	Envelope googleEnvelope = new Envelope(10000, 10010, 5000, 5010);
	// back-transform envelope to latlon
	Crs google = geoService.getCrs2("EPSG:900913");
	Crs latlon = geoService.getCrs2("EPSG:4326");
	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 reprojection (affine is fine for now...:-)
	List<RasterTile> tiles = osm.paint(latlon, latlonEnvelope, latlonScale);
	Assert.assertEquals(1, tiles.size());
	RasterTile tile = tiles.get(0);
	Assert.assertEquals("http://a.tile.openstreetmap.org/4/8/7.png", tile.getUrl());
	Assert.assertEquals(4, tile.getCode().getTileLevel());
	Assert.assertEquals(8, tile.getCode().getX());
	Assert.assertEquals(7, tile.getCode().getY());
	Assert.assertEquals(0.0, tile.getBounds().getX(), DELTA);
	Assert.assertEquals(-244.0, tile.getBounds().getY(), DELTA);
	Assert.assertEquals(244.0, tile.getBounds().getHeight(), DELTA);
	Assert.assertEquals(250.0, tile.getBounds().getWidth(), DELTA);
}