Bundles { public static URI bundleIdentifierFromMaven(String groupId, String artifactId, Version version) { Objects.requireNonNull(groupId); Objects.requireNonNull(artifactId); Objects.requireNonNull(version); try { return new URI(URI_SCHEME, groupId + ':' + artifactId + ':' + ARTIFACT_TYPE + ':' + version, null); } catch (URISyntaxException exception) { throw new IllegalStateException(String.format( "Unexpected exception while trying to create URI '%s:%s:%s:%s:%s'.", URI_SCHEME, groupId, artifactId, ARTIFACT_TYPE, version ), exception); } } private  Bundles(); static URI bundleIdentifierFromMaven(String groupId, String artifactId, Version version); static Artifact unresolvedArtifactFromURI(URI bundleIdentifier); static MutableBundle loadBundle(JAXBContext jaxbContext, XMLInputFactory xmlInputFactory,
            Artifact bundleArtifact); static final String URI_SCHEME; static final String ARTIFACT_TYPE; }
@Test public void testBundleIdentifierFromMaven() { URI uri = Bundles.bundleIdentifierFromMaven("foo", "bar", Version.valueOf("1.0")); Assert.assertEquals(uri.getScheme(), Bundles.URI_SCHEME); Assert.assertEquals(uri.getSchemeSpecificPart(), "foo:bar:ckbundle:1.0"); }