### Question:
Resources { public Image image(final String resourceName) { final URL imageUrl = getClass().getResource(resourceName); if (imageUrl != null) { try { return ImageIO.read(imageUrl); } catch (IOException e) { logger.error("Could not load image: " + resourceName, e); } } return null; }  String text(String resourceName); Image image(final String resourceName);  }### Answer:
@Test public void testImage() { Image image = resources.image("/image.png"); assertThat(image, is(notNullValue())); }
@Test public void testImageNotFound() { Image image = resources.image("/foo.png"); assertThat(image, is(nullValue())); }