### Question:
BBox implements Shape, Cloneable { @Override public boolean intersect( Shape s ) { if (s instanceof BBox) { return intersect((BBox) s); } else if (s instanceof Circle) { return ((Circle) s).intersect(this); } throw new UnsupportedOperationException("unsupported shape"); } BBox( double minLon, double maxLon, double minLat, double maxLat );  BBox( double minLon, double maxLon, double minLat, double maxLat, double minEle, double maxEle );  BBox( double minLon, double maxLon, double minLat, double maxLat, double minEle, double maxEle, boolean elevation ); boolean hasElevation(); static BBox createInverse( boolean elevation ); void update( double lat, double lon ); void update( double lat, double lon, double elev ); @Override BBox clone(); @Override boolean intersect( Shape s ); @Override boolean contains( Shape s ); boolean intersect( Circle s ); boolean intersect( BBox o ); @Override boolean contains( double lat, double lon ); boolean contains( BBox b ); boolean contains( Circle c ); @Override String toString(); String toLessPrecisionString(); @Override BBox getBounds(); @Override boolean equals( Object obj ); @Override int hashCode(); boolean isValid(); List<Double> toGeoJson(); public double minLon; public double maxLon; public double minLat; public double maxLat; public double minEle; public double maxEle; }### Answer:
@Test public void testIntersect() { assertTrue(new BBox(12, 15, 12, 15).intersect(new BBox(13, 14, 11, 16))); assertTrue(new BBox(2, 6, 6, 11).intersect(new BBox(3, 5, 5, 12))); assertTrue(new BBox(6, 11, 6, 11).intersect(new BBox(7, 10, 5, 12))); }
@Test public void testBasicJavaOverload() { new BBox(2, 4, 0, 1) { @Override public boolean intersect( Circle c ) { assertTrue(true); return super.intersect(c); } @Override public boolean intersect( Shape c ) { assertTrue(false); return true; } @Override public boolean intersect( BBox c ) { assertTrue(false); return true; } }.intersect(new Circle(1, 2, 3) { @Override public boolean intersect( Circle c ) { assertTrue(false); return true; } @Override public boolean intersect( Shape b ) { assertTrue(false); return true; } @Override public boolean intersect( BBox b ) { assertTrue(true); return true; } }); }