Container extends Box { @Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; Container other = (Container) obj; if (levels == null) { if (other.levels != null) return false; } else if (!levels.equals(other.levels)) return false; if (stackHeight != other.stackHeight) return false; if (stackWeight != other.stackWeight) return false; return true; } 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 testEquals() { assertEquals(new Container(1, 1, 1, 0), new Container(new Dimension(1, 1, 1), 1)); }