BundleResourceFactory extends FileResourceFactory implements IExtensionInitializer { protected String getNBRPath(String bundle, URI uri) { String path = uri.getPath(); return path.startsWith("/" + bundle) ? path.substring(bundle.length() + 1) : path; } BundleResourceFactory(); protected  BundleResourceFactory(ClassLoader classLoader); @Override IResource newResource(URI uri); @Override void initialize(IAggregator aggregator, IAggregatorExtension extension, IExtensionRegistrar registrar); @Override boolean handles(URI uri);  }
@Test public void getNBRPath() { URI uri = URI.create("namedbundleresource: assertEquals("Bundle matches.", "/file", factory.getNBRPath(factory.getNBRBundleName(uri), uri)); }