### Question:
AbstractBoard extends AbstractLayeredBoard<E> { public List<E> getNear(int x, int y) { List<E> result = new LinkedList<E>(); for (int layer = 0; layer < countLayers(); ++layer) { result.addAll(getNear(layer, x, y)); } return result; }  abstract E valueOf(char ch); ClientBoard forString(String boardString); @Override AbstractBoard forString(String... layers); List<Point> get(E... elements); boolean isAt(int x, int y, E element); boolean isAt(Point point, E element); E getAt(int x, int y); E getAt(Point point); List<E> getAllAt(int x, int y); List<E> getAllAt(Point point); String boardAsString(); boolean isAt(int x, int y, E... elements); boolean isAt(Point point, E... elements); boolean isNear(int x, int y, E element); boolean isNear(Point point, E element); int countNear(int x, int y, E element); int countNear(Point point, E element); List<E> getNear(int x, int y); List<E> getNear(Point point); void set(int x, int y, char ch); char[][] getField();  }### Answer:
@Test public void shouldWork_getNear() { assertEquals("[1, 1, 1, 1, 3, 1, 2, 3]", board.getNear(1, 1).toString()); assertEquals("[2, 3, 1, 2, 1, 1, 1, 1]", board.getNear(2, 2).toString()); assertEquals("[3, 1, 1]", board.getNear(3, 3).toString()); assertEquals("[]", board.getNear(5, 5).toString()); assertEquals("[1]", board.getNear(-1, -1).toString()); }