### Question:
BasicImaging implements Imaging { @Override public Image crop(Image source, PixelRange cropBnds) { BufferedImage srcImg = (BufferedImage) source.getInternalRepresentation(); int minX = cropBnds.getMinX() - source.getMinX(); int minY = cropBnds.getMinY() - source.getMinY(); BufferedImage cropped = srcImg.getSubimage(minX, minY, cropBnds.getWidth(), cropBnds.getHeight()); return new BasicImage(cropped, cropBnds.getMinX(), cropBnds.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 testCrop() throws IOException { PixelRange range = new PixelRange(50, 50, 100, 80); Image cropped = imaging.crop(img, range); Image received = imageAfterIO(cropped, ImageFormat.JPEG); assertEquals(100, cropped.getWidth()); assertEquals(80, cropped.getHeight()); Image expected = readTileImage("test1-cropped.jpg", true); assertImageEquals(expected, received); }