### Question:
AbstractLayeredBoard implements ClientBoard { protected boolean isAt(int numLayer, int x, int y, E element) { if (pt(x, y).isOutOf(size)) { return false; } return getAt(numLayer, x, y).equals(element); }  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_isAt_layer1() { assertEquals(true, board.isAt(LAYER_1, 0, 0, Elements.ONE)); assertEquals(false, board.isAt(LAYER_1, 1, 1, Elements.ONE)); assertEquals(false, board.isAt(LAYER_1, 2, 2, Elements.ONE)); assertEquals(true, board.isAt(LAYER_1, 1, 1, Elements.TWO, Elements.THREE)); assertEquals(true, board.isAt(LAYER_1, 2, 2, Elements.TWO, Elements.THREE)); assertEquals(false, board.isAt(LAYER_1, 2, 2, Elements.TWO, Elements.ONE)); }
@Test public void shouldWork_isAt_layer2() { assertEquals(true, board.isAt(LAYER_2, 1, 1, Elements.FOUR)); assertEquals(false, board.isAt(LAYER_2, 1, 2, Elements.FOUR)); assertEquals(false, board.isAt(LAYER_2, 2, 2, Elements.NONE)); assertEquals(true, board.isAt(LAYER_2, 1, 1, Elements.FOUR, Elements.NONE)); assertEquals(true, board.isAt(LAYER_2, 2, 2, Elements.FOUR, Elements.NONE)); assertEquals(false, board.isAt(LAYER_2, 2, 2, Elements.TWO, Elements.ONE)); }