### Question:
BasicImaging implements Imaging { @Override public Image overlay(Image src1, Image src2) { BufferedImage img1 = get(src1); BufferedImage img2 = get(src2); BufferedImage target = clone(img1); try { overlayByGraphicsDrawImage(img2, target); } catch (RuntimeException e) { logger.warn("Failure on overlay Operation", e); logger.debug("Attempting Overlay by pixel copy"); overlayByPixelCopy(img1, img2, target); } return new BasicImage(target, src1.getMinX(), src1.getMinY()); }  @Override Image createEmptyImage(Dimension dimension, ImageFormat tileImageFormat); @Override Image createEmptyImage(Image baseImage, Dimension dimension); @Override Image mosaic(java.util.List<Image> images, PixelRange imgBounds); @Override Image crop(Image source, PixelRange cropBnds); @Override Image scale(Image source, Dimension dimension); @Override Image overlay(Image src1, Image src2); @Override Image affineTransform(Image image, AffineTransform atf); @Override Image affineTransform(Image image, int tx, int ty, double sx, double sy); @Override Image read(InputStream is, int minX, int minY, boolean forceArgb); @Override Image fromRenderedImage(RenderedImage image); @Override Image reprojectByWarping(Image srcImg, MapUnitToPixelTransform mupTransform, CrsId srs, CoordinateReferenceSystem<?> requestedSRS, MapUnitToPixelTransform targetMupTransform, double v);  }### Answer:
@Test public void testOverlay() throws IOException{ Image img1 = readTileImage("test1.png", false); Image img2 = readTileImage("test2.png", false); Image result = imaging.overlay(img1, img2); Image received = imageAfterIO(result, ImageFormat.PNG); Image expected = readTileImage("test1-test2-overlay.png", true); assertImageEquals(expected, received); }