### Question:
ReferencedEnvelope extends Envelope implements org.opengis.geometry.Envelope,
    BoundingBox { public static ReferencedEnvelope create( ReferencedEnvelope origional ){ if( origional instanceof ReferencedEnvelope3D ){ return new ReferencedEnvelope3D( (ReferencedEnvelope3D) origional ); } return new ReferencedEnvelope( origional ); } ReferencedEnvelope();  ReferencedEnvelope(CoordinateReferenceSystem crs);  ReferencedEnvelope(final double x1, final double x2, final double y1, final double y2,
        final CoordinateReferenceSystem crs);  ReferencedEnvelope(final Rectangle2D rectangle, final CoordinateReferenceSystem crs);  ReferencedEnvelope(final ReferencedEnvelope envelope);  ReferencedEnvelope(final BoundingBox bbox);  ReferencedEnvelope(final org.opengis.geometry.Envelope envelope);  ReferencedEnvelope(final Envelope envelope, final CoordinateReferenceSystem crs); void init(BoundingBox bounds); CoordinateReferenceSystem getCoordinateReferenceSystem(); CoordinateReferenceSystem crs(); int getDimension(); double getMinimum(final int dimension); double minX(); double minY(); double getMaximum(final int dimension); double maxX(); double maxY(); double getCenter(final int dimension); double getMedian(final int dimension); double getLength(final int dimension); double getSpan(final int dimension); DirectPosition getLowerCorner(); DirectPosition getUpperCorner(); boolean isEmpty(); boolean contains(DirectPosition pos); boolean contains(final BoundingBox bbox); boolean intersects(final BoundingBox bbox); @Override Envelope intersection(Envelope env); void include(final BoundingBox bbox); void expandToInclude(DirectPosition pt ); @Override void expandToInclude(Envelope other); void include(double x, double y); void setBounds(final BoundingBox bbox); BoundingBox toBounds(final CoordinateReferenceSystem targetCRS); ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS, boolean lenient); ReferencedEnvelope transform(final CoordinateReferenceSystem targetCRS,
        final boolean lenient, final int numPointsForTransformation); @Override int hashCode(); @Override boolean equals(final Object object); boolean boundsEquals2D(final org.opengis.geometry.Envelope other, double eps); @Override String toString(); static ReferencedEnvelope create( ReferencedEnvelope origional ); static ReferencedEnvelope create(CoordinateReferenceSystem crs); static ReferencedEnvelope create(org.opengis.geometry.Envelope env,
            CoordinateReferenceSystem crs); static ReferencedEnvelope create(ReferencedEnvelope env, CoordinateReferenceSystem crs); static ReferencedEnvelope create(Envelope env, CoordinateReferenceSystem crs); static ReferencedEnvelope reference(Envelope e); static ReferencedEnvelope reference(BoundingBox e); static ReferencedEnvelope reference(ReferencedEnvelope e); static ReferencedEnvelope reference(org.opengis.geometry.Envelope env); static ReferencedEnvelope EVERYTHING; }### Answer:
@Test public void testFactoryMethod() throws Exception { try { ReferencedEnvelope bounds = new ReferencedEnvelope( DefaultGeographicCRS.WGS84_3D ); fail("ReferencedEnvelope should not be able to represent 3D CRS such as GDA94"); } catch (Exception expected){ } ReferencedEnvelope bounds2 = ReferencedEnvelope.create( DefaultGeographicCRS.WGS84_3D ); assertNotNull( bounds2 ); }