ImageUtils { public static Image loadImage(final File file) { return new Image(file.toURI().toString()); }  static ImageLibrary createImageLibrary(final File directoryFile); static ImageLibrary createImageLibrary(final File directoryFile, final File defaultDirectoryFile); static ImageLibrary createDefaultImageLibrary(final ImageLibrary fallbackImageLibrary); static ImageLibrary createCustomizedImageLibrary(final ImageLibrary fallbackImageLibrary, final String path); @Deprecated static List<Image> loadAllImages(final File directoryFile); static List<File> listImageFiles(final File directoryFile); static List<Image> loadAllAsImages(final List<File> imageFiles); static Image loadImage(final File file); static Image loadImage(final String resource);  }
@Test void canLoadAFileAsAnImage() { final String pathname = (localDataFolder + sep + "gazeplayClassicLogo.png"); final Image image = ImageUtils.loadImage(new File(pathname)); assert (image.getUrl().contains("gazeplayClassicLogo.png")); }