### Question:
KPiece implements Iterable<KUnitSquare> { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + height; result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + pieceId; result = prime * result + ((unitSquares == null) ? 0 : unitSquares.hashCode()); result = prime * result + width; return result; } 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 testHashCode() { KPiece rot = KPieces.TETRAMINO_T_1; int r0 = rot.hashCode(); rot = rot.rotatedNinetyDegrees(); int r90 = rot.hashCode(); rot = rot.rotatedNinetyDegrees(); Assert.assertTrue(!(r90 == r0)); int r180 = rot.hashCode(); rot = rot.rotatedNinetyDegrees(); Assert.assertTrue(!(r180 == r90)); int r270 = rot.hashCode(); rot = rot.rotatedNinetyDegrees(); Assert.assertTrue(!(r270 == r180)); int r360 = rot.hashCode(); rot = rot.rotatedNinetyDegrees(); Assert.assertTrue(!(r360 == r270)); Assert.assertTrue(r360 == r0); int r450 = rot.hashCode(); rot = rot.rotatedNinetyDegrees(); Assert.assertTrue(!(r450 == r360)); int r540 = rot.hashCode(); rot = rot.rotatedNinetyDegrees(); Assert.assertTrue(!(r540 == r450)); int r630 = rot.hashCode(); rot = rot.rotatedNinetyDegrees(); Assert.assertTrue(!(r630 == r540)); int r720 = rot.hashCode(); rot = rot.rotatedNinetyDegrees(); Assert.assertTrue(!(r720 == r630)); Assert.assertTrue(r720 == r360); Assert.assertTrue(r720 == r0); }