### Question:
UtilZip { public static Collection<ZipEntry> getEntriesByExtension(File jar, String path, String extension) { Check.notNull(jar); Check.notNull(path); Check.notNull(extension); try (ZipFile zip = new ZipFile(jar)) { return checkEntries(zip, path, extension); } catch (final IOException exception) { throw new LionEngineException(exception, ERROR_OPEN_ZIP + jar.getAbsolutePath()); } } private  UtilZip(); static Collection<ZipEntry> getEntriesByExtension(File jar, String path, String extension);  }### Answer:
@Test void testEntriesByExtension() { final File jar = Medias.create("resources.jar").getFile(); final String path = UtilZipTest.class.getPackage().getName().replace(Constant.DOT, Medias.getSeparator()); final Collection<ZipEntry> entries = UtilZip.getEntriesByExtension(jar, path, "png"); assertEquals(path + Medias.getSeparator() + "image.png", entries.iterator().next().getName()); }
@Test void testEntriesByExtensionWrongJar() { assertThrows(() -> UtilZip.getEntriesByExtension(new File("void"), Constant.EMPTY_STRING, Constant.EMPTY_STRING), UtilZip.ERROR_OPEN_ZIP + new File("void").getAbsolutePath()); }