DeliverablePackage implements Comparable<DeliverablePackage> { public boolean isInstalled() { return installedDeliverable != null && deliverablesDir.resolve(installedDeliverable.getBasePath()).toFile().exists(); } <T extends Deliverable> DeliverablePackage(Deliverable installedDeliverable, Path deliverableDir, DeliverableRegistry<T> deliverableRegistry); boolean isInstalled(); Deliverable reference(); void displayInformation(); String getId(); String getName(); String getDescription(); URL getUrl(); Deliverable.Type getType(); String getVersion(); String getInstalledVersion(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(@NotNull DeliverablePackage deliverablePackage);  }
@Test public void test_is_installed_deliverable() throws IOException { ExtensionService extensionService = new ExtensionService(deliverableDir.getRoot().toPath()); DeliverablePackage deliverablePackageA = new DeliverablePackage(extensionService.newDeliverable(deliverableDir.newFile( "my-extension.jar").toURI().toURL()),deliverableDir.getRoot().toPath(),extensionService.deliverableRegistry); assertThat(deliverablePackageA.isInstalled()).isTrue(); }