### Question:
PropertiesPluginDescriptorFinder implements PluginDescriptorFinder { @Override public PluginDescriptor find(Path pluginPath) { Properties properties = readProperties(pluginPath); return createPluginDescriptor(properties); } PropertiesPluginDescriptorFinder();  PropertiesPluginDescriptorFinder(String propertiesFileName); @Override boolean isApplicable(Path pluginPath); @Override PluginDescriptor find(Path pluginPath); static final String DEFAULT_PROPERTIES_FILE_NAME; static final String PLUGIN_ID; static final String PLUGIN_DESCRIPTION; static final String PLUGIN_CLASS; static final String PLUGIN_VERSION; static final String PLUGIN_PROVIDER; static final String PLUGIN_DEPENDENCIES; static final String PLUGIN_REQUIRES; static final String PLUGIN_LICENSE; }### Answer:
@Test public void testFind() throws Exception { PluginDescriptorFinder descriptorFinder = new PropertiesPluginDescriptorFinder(); PluginDescriptor plugin1 = descriptorFinder.find(pluginsPath.resolve("test-plugin-1")); PluginDescriptor plugin2 = descriptorFinder.find(pluginsPath.resolve("test-plugin-2")); assertEquals("test-plugin-1", plugin1.getPluginId()); assertEquals("Test Plugin 1", plugin1.getPluginDescription()); assertEquals(TestPlugin.class.getName(), plugin1.getPluginClass()); assertEquals("0.0.1", plugin1.getVersion()); assertEquals("Decebal Suiu", plugin1.getProvider()); assertEquals(2, plugin1.getDependencies().size()); assertEquals("test-plugin-2", plugin1.getDependencies().get(0).getPluginId()); assertEquals("test-plugin-3", plugin1.getDependencies().get(1).getPluginId()); assertEquals("~1.0", plugin1.getDependencies().get(1).getPluginVersionSupport()); assertEquals("Apache-2.0", plugin1.getLicense()); assertEquals(">=1", plugin1.getRequires()); assertTrue(versionManager.checkVersionConstraint("1.0.0", plugin1.getRequires())); assertFalse(versionManager.checkVersionConstraint("0.1.0", plugin1.getRequires())); assertEquals("test-plugin-2", plugin2.getPluginId()); assertEquals("", plugin2.getPluginDescription()); assertEquals(TestPlugin.class.getName(), plugin2.getPluginClass()); assertEquals("0.0.1", plugin2.getVersion()); assertEquals("Decebal Suiu", plugin2.getProvider()); assertEquals(0, plugin2.getDependencies().size()); assertEquals("*", plugin2.getRequires()); assertTrue(versionManager.checkVersionConstraint("1.0.0", plugin2.getRequires())); }
@Test public void testNotFound() { PluginDescriptorFinder descriptorFinder = new PropertiesPluginDescriptorFinder(); assertThrows(PluginRuntimeException.class, () -> descriptorFinder.find(pluginsPath.resolve("test-plugin-3"))); }