MapLayer { public BoundingBox getBoundingBox() { if( bbox != null ) { return bbox; } if( parent != null ) { return parent.getBoundingBox(); } return null; } MapLayer(String name, String title, Collection<String> srsList,
          Collection<MapLayer> subLayers, BoundingBox latLon);  MapLayer( String name, String title, Collection<String> srsList, Collection<MapLayer> subLayers,
  		BoundingBox bbox, Map<String,BoundingBox> boundingBoxMap); List<BoundingBox> getAllBoundingBoxList(); int numSubLayers(); MapLayer getSubLayer( int n ); ArrayList<MapLayer> getSubLayerList(); ArrayList getLayerList(); String getTitle(); String getName(); MapLayer getParent(); BoundingBox getBoundingBox(); BoundingBox getBoundingBox(String srs); static Envelope getBoundingBox(String srs, MapLayer lyr, Envelope env); BoundingBox getLatLonBoundingBox(); Map<String,BoundingBox> getBoundingBoxMap(); ArrayList getSRSList(); Collection getFullSRSList(); @Override String toString();  }
@Test public void testGetBoundingBoxStatic(){ Envelope env = MapLayer.getBoundingBox("EPSG:2154", parent, new Envelope()); assertTrue(env.equals(new Envelope(40,70,40,70))); String s = "EPSG:2154"; String wgs = "EPSG:4326"; Collection<String> srs = new ArrayList<String>(); List<MapLayer> children = new ArrayList<MapLayer>(2); children.add(c1); children.add(c2); BoundingBox bb = new BoundingBox(s, new Envelope(10,20,10,20)); BoundingBox bw = new BoundingBox(wgs, new Envelope(2,6,5,7)); HashMap<String, BoundingBox> hm = new HashMap<String,BoundingBox>(); hm.put(s,bb); hm.put(wgs,bw); parent = new MapLayer("parent","parent",srs,children,bw, hm); env = MapLayer.getBoundingBox("EPSG:2154", parent, new Envelope()); assertTrue(env.equals(new Envelope(10,20,10,20))); }