@Test public void testImage() { Image image = resources.image("/image.png"); assertThat(image, is(notNullValue())); }
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; }
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; } }
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; }  }
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); }
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);  }