### Question:
KPiece implements Iterable<KUnitSquare> { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; KPiece other = (KPiece) obj; if (height != other.height) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (pieceId != other.pieceId) return false; if (unitSquares == null) { if (other.unitSquares != null) return false; } else if (!unitSquares.equals(other.unitSquares)) return false; if (width != other.width) return false; return true; } KPiece(final String name, final int pieceId,
			final Set<KUnitSquare> unitSquares);  KPiece(String name, int pieceId, String... unitSquaresStr); String getName(); int getPieceId(); int getWidth(); int getHeight(); @Override Iterator<KUnitSquare> iterator(); @Override String toString(); KPiece rotatedNinetyDegrees(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testEquals() { KPiece rot = KPieces.TETRAMINO_T_1; KPiece rot2 = rot.rotatedNinetyDegrees(); Assert.assertNotSame(rot, rot2); KPiece rot3 = rot.rotatedNinetyDegrees(); Assert.assertNotSame(rot2, rot3); KPiece rot4 = rot.rotatedNinetyDegrees(); Assert.assertEquals(rot3, rot4); KPiece rot5 = rot.rotatedNinetyDegrees(); Assert.assertNotSame(rot4, rot5); }