### Question:
AbstractLayeredBoard implements ClientBoard { protected char[][] getField(int numLayer) { return field[numLayer]; }  ClientBoard forString(String boardString); ClientBoard forString(String... layers); abstract E valueOf(char ch); int size(); static Set<Point> removeDuplicates(Collection<Point> all); @Override String toString(); boolean isOutOfField(int x, int y); List<String> getLayersString(); void setSource(JSONObject source);  }### Answer:
@Test public void shouldWork_toString_whenThreeLayers() { board = board("{\"layers\":[\"" + "1111" + "1221" + "1331" + "1111" + "\", \"" + " " + " 4 " + " 4 " + " " + "\", \"" + " " + " 5 " + " 5 " + " " + "\"]}"); assertEquals( "[[1, 1, 1, 1], " + "[1, 2, 3, 1], " + "[1, 2, 3, 1], " + "[1, 1, 1, 1]]", Arrays.deepToString(board.getField(LAYER_1))); assertEquals( "[[ , , , ], " + "[ , 4, , ], " + "[ , , 4, ], " + "[ , , , ]]", Arrays.deepToString(board.getField(LAYER_2))); assertEquals( "[[ , , , ], " + "[ , , 5, ], " + "[ , 5, , ], " + "[ , , , ]]", Arrays.deepToString(board.getField(LAYER_3))); }
@Test public void shouldWork_getField() { assertEquals( "[[1, 1, 1, 1], " + "[1, 2, 3, 1], " + "[1, 2, 3, 1], " + "[1, 1, 1, 1]]", Arrays.deepToString(board.getField(LAYER_1))); assertEquals( "[[ , , , ], " + "[ , 4, , ], " + "[ , , 4, ], " + "[ , , , ]]", Arrays.deepToString(board.getField(LAYER_2))); }