@Test
    public void multipleBoxTest() {
        BoundingBox bigBox = new BoundingBox(-100.0d, 100.0d, -100.0d, 100.0d);
        List<BoundingBox> boxes = new ArrayList<BoundingBox>();
        for (int i=0; i<10000; i++) {
            boxes.add(BoundingBox.containing(bigBox.randomPoint(), bigBox.randomPoint()));
        }
        for (int i=0; i<boxes.size();i++) {
            BoundingBox first = boxes.get(i);
            assertTrue(bigBox.contains(first));
            assertTrue(first.isContainedBy(bigBox));
            assertFalse(bigBox.isOutside(first));
            assertFalse(first.isOutside(bigBox));
            assertFalse(bigBox.intersects(first));
            assertFalse(first.intersects(bigBox));
            for (int j=i+1; j< boxes.size(); j++) {
                BoundingBox second = boxes.get(j);
                if (second.contains(first)) {
                    assertTrue(first.isContainedBy(second));
                    assertFalse(first.contains(second));
                    assertFalse(second.isOutside(first));
                    assertFalse(first.isOutside(second));
                    assertFalse(second.intersects(first));
                    assertFalse(first.intersects(second));

                } else if (first.contains(second)) {
                    assertTrue(second.isContainedBy(first));
                    assertFalse(second.contains(first));
                    assertFalse(second.isOutside(first));
                    assertFalse(first.isOutside(second));
                    assertFalse(second.intersects(first));
                    assertFalse(first.intersects(second));

                } else if (first.isOutside(second)) {
                    assertTrue(second.isOutside(first));
                    assertFalse(first.contains(second));
                    assertFalse(first.isContainedBy(second));
                    assertFalse(second.contains(first));
                    assertFalse(second.isContainedBy(first));
                    assertFalse(second.intersects(first));
                    assertFalse(first.intersects(second));
                } else if (first.intersects(second)) {
                    assertTrue(second.intersects(first));
                    assertFalse(first.contains(second));
                    assertFalse(first.isContainedBy(second));
                    assertFalse(second.contains(first));
                    assertFalse(second.isContainedBy(first));
                    assertFalse(second.isOutside(first));
                    assertFalse(first.isOutside(second));
                }

            }
        }
    }