### Question:
ImageThumbnailProvider implements ThumbnailProvider { @Override public InputStream getThumbnail(Resource resource) { return resource.adaptTo(InputStream.class); }  @Override boolean applies(Resource resource); @Override InputStream getThumbnail(Resource resource);  }### Answer:
@Test public void testImageThumbnailProvider() throws IOException { log.info("testImageThumbnailProvider"); ImageThumbnailProvider itp = new ImageThumbnailProvider(); assertNotNull(itp.getThumbnail(imageFile)); assertArrayEquals(IOUtils.toByteArray(getClass().getClassLoader().getResourceAsStream("apache.png")), IOUtils.toByteArray(itp.getThumbnail(imageFile))); }