JerseyNode extends ComponentNode { public static BundleInfo createBundleInfo(Bundle bundle, Collection<String> classEntries) { BundleInfo bundleInfo = new BundleInfo(bundle.getSymbolicName(), bundle.getVersion(), bundle.getLocation(), webInfUrl(bundle), bundle.adapt(BundleWiring.class).getClassLoader()); bundleInfo.setClassEntries(classEntries); return bundleInfo; } JerseyNode(ComponentId componentId, String configId, Class<?> clazz, Osgi osgi); @Override int hashCode(); @Override boolean equals(Object other); static BundleInfo createBundleInfo(Bundle bundle, Collection<String> classEntries); static Bundle getBundle(Osgi osgi, String bundleSpec);  }
@Test public void bundle_info_is_initialized() { RestApiContext.BundleInfo bundleInfo = JerseyNode.createBundleInfo(bundle, Collections.emptyList()); assertThat(bundleInfo.symbolicName, is(bundle.getSymbolicName())); assertThat(bundleInfo.version, is(bundle.getVersion())); assertThat(bundleInfo.fileLocation, is(bundle.getLocation())); }