@Test
public void testGetImage() throws IOException, InterruptedException {

  InputStream is = getInputStream(I_3001A);
  ResourceResponse resourceResponse = mock(ResourceResponse.class);
  Resource resource = mock(Resource.class);
  when(resourceResponse.getResource()).thenReturn(resource);
  when(resource.getInputStream()).thenReturn(is);
  BufferedImage image = catalogOutputAdapter.getImage(resourceResponse);
  assertThat(image, is(notNullValue()));
  assertThat(image.getWidth(), is(1024));
  assertThat(image.getHeight(), is(1024));
  verify(lock).acquire();
  verify(lock).release();
}