### Question:
Board implements WorldState { public int tileAt(int i, int j) throws IndexOutOfBoundsException { if ( !validate(i) || !validate(j) ) throw new IndexOutOfBoundsException("i: " + i + " or j: " + j + " is out of bounds! Please check!\n"); return board.get(i * N + j); } Board(int[][] tiles); int tileAt(int i, int j); int size(); @Override Iterable<WorldState> neighbors(); int hamming(); int manhattan(); int estimatedDistanceToGoal(); boolean equals(Object y); String toString();  }### Answer:
@Test public void verifyImmutability() { int r = 2; int c = 2; int[][] x = new int[r][c]; int cnt = 0; for (int i = 0; i < r; i += 1) { for (int j = 0; j < c; j += 1) { x[i][j] = cnt; cnt += 1; } } Board b = new Board(x); assertEquals("Your Board class is not being initialized with the right values.", 0, b.tileAt(0, 0)); assertEquals("Your Board class is not being initialized with the right values.", 1, b.tileAt(0, 1)); assertEquals("Your Board class is not being initialized with the right values.", 2, b.tileAt(1, 0)); assertEquals("Your Board class is not being initialized with the right values.", 3, b.tileAt(1, 1)); x[1][1] = 1000; assertEquals("Your Board class is mutable and you should be making a copy of the values in the passed tiles array. Please see the FAQ!", 3, b.tileAt(1, 1)); }