@Test
public void testQueryWrappingMercatorWorld() throws Exception {

    ReferencedEnvelope world = new ReferencedEnvelope(-200, 200, -89, 89, WGS84);
    ReferencedEnvelope mercatorEnvelope = world.transform(MERCATOR_SHIFTED, true);
    // get query area, we expect just one envelope spanning the whole world
    ProjectionHandler handler = ProjectionHandlerFinder.getHandler(mercatorEnvelope, WGS84, true);
    List<ReferencedEnvelope> envelopes = handler.getQueryEnvelopes();
    assertEquals(1, envelopes.size());
    ReferencedEnvelope env = envelopes.get(0);
    assertEquals(-180.0, env.getMinX(), EPS);
    assertEquals(180.0, env.getMaxX(), EPS);
    assertEquals(-89, env.getMinY(), 0.1);
    assertEquals(89.0, env.getMaxY(), 0.1);
}