@Test
public void testWrappingOn3DCRS() throws Exception {

    CoordinateReferenceSystem crs = CRS.decode("EPSG:4939", true);
    SingleCRS hcrs = CRS.getHorizontalCRS(crs);
    ReferencedEnvelope wgs84Envelope = new ReferencedEnvelope(-190, 60, -90, 45,
            hcrs);
    ProjectionHandler handler = ProjectionHandlerFinder.getHandler(wgs84Envelope, crs, true);
    assertNull(handler.validAreaBounds);
    List<ReferencedEnvelope> envelopes = handler.getQueryEnvelopes();
    assertEquals(2, envelopes.size());
    ReferencedEnvelope expected = new ReferencedEnvelope(170, 180, -90, 45, hcrs);
    assertTrue(envelopes.remove(wgs84Envelope));
    assertEquals(expected, envelopes.get(0));
}