### Question:
MapTileAreaBorderComputer implements MapTileAreaComputer { @Override public MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse) { final MapTileArea out = pReuse != null ? pReuse : new MapTileArea(); if (pSource.size() == 0) { out.reset(); return out; } final int left = pSource.getLeft() - mBorder; final int top = pSource.getTop() - mBorder; final int additional = 2 * mBorder - 1; out.set(pSource.getZoom(), left, top, left + pSource.getWidth() + additional, top + pSource.getHeight() + additional); return out; } MapTileAreaBorderComputer(final int pBorder); int getBorder(); @Override MapTileArea computeFromSource(final MapTileArea pSource, final MapTileArea pReuse);  }### Answer:
@Test public void testOnePointModulo() { final MapTileArea source = new MapTileArea(); final MapTileArea dest = new MapTileArea(); final Set<Long> set = new HashSet<>(); final int border = 2; final MapTileAreaBorderComputer computer = new MapTileAreaBorderComputer(border); final int zoom = 5; final int sourceX = 1; final int sourceY = 31; source.set(zoom, sourceX, sourceY, sourceX, sourceY); add(set, zoom, sourceX, sourceY, border); computer.computeFromSource(source, dest); check(dest, set, zoom); }
@Test public void testTwoContiguousPointsModulo() { final MapTileArea source = new MapTileArea(); final MapTileArea dest = new MapTileArea(); final Set<Long> set = new HashSet<>(); final int border = 2; final MapTileAreaBorderComputer computer = new MapTileAreaBorderComputer(border); final int zoom = 5; final int sourceX = 1; final int sourceY = 31; source.set(zoom, sourceX, sourceY, sourceX + 1, sourceY); add(set, zoom, sourceX, sourceY, border); add(set, zoom, sourceX + 1, sourceY, border); computer.computeFromSource(source, dest); check(dest, set, zoom); }