### Question:
BlockContainer extends AbstractBlock implements Block, Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BlockContainer)) { return false; } if (!super.equals(obj)) { return false; } BlockContainer that = (BlockContainer) obj; if (!this.arrangement.equals(that.arrangement)) { return false; } if (!this.blocks.equals(that.blocks)) { return false; } return true; } BlockContainer();  BlockContainer(Arrangement arrangement); Arrangement getArrangement(); void setArrangement(Arrangement arrangement); boolean isEmpty(); List<Block> getBlocks(); void add(Block block); void add(Block block, Object key); void clear(); @Override Size2D arrange(Graphics2D g2, RectangleConstraint constraint); @Override void draw(Graphics2D g2, Rectangle2D area); @Override Object draw(Graphics2D g2, Rectangle2D area, Object params); @Override boolean equals(Object obj); @Override Object clone();  }### Answer:
@Test public void testEquals() { BlockContainer c1 = new BlockContainer(new FlowArrangement()); BlockContainer c2 = new BlockContainer(new FlowArrangement()); assertEquals(c1, c2); assertEquals(c2, c2); c1.setArrangement(new ColumnArrangement()); assertFalse(c1.equals(c2)); c2.setArrangement(new ColumnArrangement()); assertEquals(c1, c2); c1.add(new EmptyBlock(1.2, 3.4)); assertFalse(c1.equals(c2)); c2.add(new EmptyBlock(1.2, 3.4)); assertEquals(c1, c2); }