RegisteredPlugin implements Comparable<RegisteredPlugin> { public String getDescription() { if (this.description == null) { final String defaultValue = ""; try (final Jar jar = this.file.getJar()) { if (jar != null) { this.description = jar.getManifestAttributeValue("Plugin-Description", defaultValue); } } catch (IOException e) { LOGGER.log(WARNING, "Error retrieving the description", e); this.description = defaultValue; } } return description; } RegisteredPlugin(PluginFile file); PluginFile getFile(); String getName(); String getVersion(); String getDescription(); String getIconName(); byte[] getIcon(); IPlugin getInstance(); boolean isInstanceOf(final Class<? extends IPlugin> clazz); boolean install(); void uninstall(); boolean isInstalled(); boolean start(); void stop(); boolean isStarted(); @Override int compareTo(RegisteredPlugin o); @Override boolean equals(Object o); @Override int hashCode();  }
@Test void getDescriptionWhenNotUnzipped() throws IOException { final File plugin = PluginTestUtils.createDummyPlugin("my-plugin", "Awesome plugin", "1.0"); final RegisteredPlugin registeredPlugin = new RegisteredPlugin(new PluginFile(plugin)); final String description = registeredPlugin.getDescription(); assertTrue(description.startsWith("This is a dummy plugin"), "Description is: " + description); }