ImageUtils { public static List<File> listImageFiles(final File directoryFile) { log.debug("Listing images in directory {}", directoryFile.getAbsolutePath()); File[] files = directoryFile.listFiles(ImageUtils::isImage); if (files == null) { files = new File[0]; } final List<File> result = Arrays.asList(files); log.debug("Found {} files in directory {}", files.length, directoryFile.getAbsolutePath()); return result; }  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 canListAllImagesInDirectory() { final List<File> list = ImageUtils.listImageFiles(new File(localDataFolder)); assert (list.size() == 1); }