Container extends Box { public Dimension getUsedSpace() { Dimension maxBox = Dimension.EMPTY; for (Level level : levels) { maxBox = getUsedSpace(level, maxBox); } return maxBox; } Container(Container container);  Container(Dimension dimension, int weight);  Container(int w, int d, int h, int weight);  Container(String name, int w, int d, int h, int weight); List<Container> rotations(); boolean add(Level element); Level currentLevel(); int getStackHeight(); int getStackWeight(); void add(Placement placement); Level addLevel(); Dimension getFreeLevelSpace(); int getFreeWeight(); List<Level> getLevels(); Placement get(int level, int placement); void validateCurrentLevel(); void clear(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); Dimension getUsedSpace(); Container clone(); Container rotate3D(); Container rotate2D(); Container rotate2D3D(); boolean isFreeSpaceInLevel(int i); void removeLevel(int index); int clearLevelsForBoxes(int limit);  }
@Test void testGetUsedSpaceWhenEmpty() { assertEquals(new Dimension(0, 0, 0), new Container(0, 0, 0, 0).getUsedSpace()); }