@Test
public void getEnvelope2D() {

    ReferencedEnvelope refEnv = new ReferencedEnvelope(
            -10, 10, -5, 5, DefaultGeographicCRS.WGS84);
    
    Envelope2D env2D = JTS.getEnvelope2D(refEnv, refEnv.getCoordinateReferenceSystem());
    
    CRS.equalsIgnoreMetadata(
            refEnv.getCoordinateReferenceSystem(),
            env2D.getCoordinateReferenceSystem());
    
    assertTrue(env2D.boundsEquals(refEnv, 0, 1, TOL));
}