### Question:
YamlPluginDescriptorScanner implements ModuleScanner { @Override public Optional<ModuleDescriptor> scan(File file, URL source) { if (log.isLoggable(Level.INFO)) { log.log(Level.INFO, "yaml.descriptor.scanner.starting", new Object[] {file, source}); } for (val entryName : SEARCH_PATHS) { val explodedFile = new File(file, entryName); if (explodedFile.exists()) { try (val reader = new InputStreamReader( Files.newInputStream(explodedFile.toPath(), StandardOpenOption.READ))) { val result = getModuleDescriptor(explodedFile, source, reader); if (log.isLoggable(Level.FINE)) { log.log( Level.FINE, "yaml.descriptor.scanner.found", new Object[] {entryName, file, source}); } return result; } catch (IOException e) { log.log( Level.INFO, "yaml.descriptor.scanner.error", new Object[] {file, source, e.getMessage()}); log.log(Level.FINEST, "Full trace", e); } } try { val zipfile = new JarFile(file, true); val entry = zipfile.getJarEntry(entryName); if (entry != null) { val opt = doParse(file, zipfile, entry, source); if (opt.isPresent()) { return opt; } } } catch (IOException e) { log.log( Level.INFO, "yaml.descriptor.scanner.error", new Object[] {file, source, e.getMessage()}); log.log(Level.FINEST, "Full trace", e); } } return Optional.empty(); }  @Override Optional<ModuleDescriptor> scan(File file, URL source);  }### Answer:
@Test void ensureReadingPluginNameWorks() { val moduleDescriptor = scanner.scan(moduleFile, fileUrl).get(); assertEquals(moduleDescriptor.getCoordinate().getName(), "yaml-loader", "name must be correct"); }
@Test void ensureReadingPluginGroupWorks() { val moduleDescriptor = scanner.scan(moduleFile, fileUrl).get(); assertEquals( moduleDescriptor.getCoordinate().getGroup(), "io.sunshower", "group must be correct"); }
@Test void ensureReadingVersionWorks() { val moduleDescriptor = scanner.scan(moduleFile, fileUrl).get(); assertEquals( moduleDescriptor.getCoordinate().getVersion(), new SemanticVersion("1.0.0"), "version must be correct"); }
@Test void ensureReadingDescriptionWorks() { val moduleDescriptor = scanner.scan(moduleFile, fileUrl).get(); assertNotNull(moduleDescriptor.getDescription(), "module description must not be null"); }
@Test void ensureReadingTypeWorks() { val moduleDescriptor = scanner.scan(moduleFile, fileUrl).get(); assertEquals( moduleDescriptor.getType(), Module.Type.KernelModule, "Module type must be correct"); }
@Test @Disabled void ensureReadModuleHasCorrectNumberOfDependencies() { val moduleDescriptor = scanner.scan(moduleFile, fileUrl).get(); assertEquals( moduleDescriptor.getDependencies().size(), 1, "module dependency count must be correct"); }