@Test
public void testGetAllBoundingBoxFromParent(){

    String s = "EPSG:2154";
    String wgs = "EPSG:4326";
    Collection<String> srs = new ArrayList<String>();
    srs.add(s);
    srs.add(wgs);
    HashMap<String, BoundingBox> hm = new HashMap<String,BoundingBox>();
    MapLayer ml = new MapLayer("c1", "c1", srs, new ArrayList<MapLayer>(), null, hm);
    List<MapLayer> children = new ArrayList<MapLayer>(2);
    children.add(ml);
    BoundingBox bb = new BoundingBox(s, new Envelope(10,20,10,20));
    BoundingBox bw = new BoundingBox(wgs, new Envelope(2,6,5,7));
    hm = new HashMap<String,BoundingBox>();
    hm.put(s,bb);
    hm.put(wgs,bw);
    MapLayer par = new MapLayer("parent","parent",srs,children,bw, hm);
    List<BoundingBox> bbs = ml.getAllBoundingBoxList();
    Envelope exp1 = new Envelope(10,20,10,20);
    Envelope exp2 = new Envelope(2,6,5,7);
    Envelope real0 = bbs.get(0).getEnvelope();
    Envelope real1 = bbs.get(1).getEnvelope();
    assertTrue(exp1.equals(real0) || exp2.equals(real0));
    assertTrue(exp1.equals(real1) || exp2.equals(real1));
    assertFalse(real1.equals(real0));
}