@Test
public void testBoundsEquals2D() {

    Rectangle2D bounds = new Rectangle2D.Double(-20.0, -20.0, 40.0, 40.0);
    ReferencedEnvelope env1 = new ReferencedEnvelope(bounds, null);
    ReferencedEnvelope env2 = new ReferencedEnvelope(bounds, null);
    double eps = 1.0e-4d;
    assertTrue(env1.boundsEquals2D(env2, eps));
    bounds = new Rectangle2D.Double(-20.01, -20.01, 40.0, 40.0);
    env2 = new ReferencedEnvelope(bounds, null);
    assertFalse(env1.boundsEquals2D(env2, eps));
}