### Question:
Medias { public static synchronized List<Media> getByExtension(String extension, Media folder) { Check.notNull(extension); Check.notNull(folder); if (!loader.isPresent()) { return getFilesByExtension(folder, extension); } final File jar = getJarResources(); final String prefix = getJarResourcesPrefix(); final String fullPath = Medias.create(prefix, folder.getPath()).getPath(); final int prefixLength = prefix.length() + 1; return getByExtension(jar, fullPath, prefixLength, extension); } private  Medias(); static synchronized Media create(String... path); static synchronized void setFactoryMedia(FactoryMedia factoryMedia); static synchronized void setResourcesDirectory(String directory); static synchronized void setLoadFromJar(Class<?> clazz); static synchronized Media get(File file); static synchronized List<Media> getByExtension(String extension, Media folder); static List<Media> getByExtension(File jar, String fullPath, int prefixLength, String extension); static Media getWithSuffix(Media media, String suffix); static synchronized String getResourcesDirectory(); static synchronized Optional<Class<?>> getResourcesLoader(); static synchronized File getJarResources(); static synchronized String getJarResourcesPrefix(); static String getSeparator();  }### Answer:
@Test void testGetByExtension() { Medias.setLoadFromJar(MediasTest.class); final Collection<Media> medias = Medias.getByExtension("png", Medias.create("")); assertEquals("image.png", medias.iterator().next().getPath()); }