public class TestPiece {
@Test
public void testPiece(){
Piece blank = Piece.pieceForNumber(0);
Piece one = Piece.pieceForNumber(1);
Piece otherOne = Piece.pieceForNumber(1);
Piece two = Piece.pieceForNumber(2);
Assert.assertThat(one, is(one));
Assert.assertThat(one, is(otherOne));
Assert.assertThat(blank, is(blank));
Assert.assertThat(blank, is(not(one)));
Assert.assertTrue(one.compareTo(two) < 0);
Assert.assertTrue(two.compareTo(one) > 0);
Assert.assertTrue(one.compareTo(one) == 0);
Assert.assertTrue(two.compareTo(two) == 0);
// blank always comes at the end
Assert.assertTrue(blank.compareTo(one) > 0);
Assert.assertTrue(one.compareTo(blank) < 0);
Assert.assertTrue(one.compareTo(one) == 0);