Source:
private void strictCheckOfDependenciesList(final String bundleSymbolicNameToCheck, final Map<String, Version> bundleDependenciesWithVersion, final Set<String> reexportedDependencies, final Set<String> greedyDependencies, final Set<String> optionalDependencies) { Assert.assertNotNull(bundleSymbolicNameToCheck); Assert.assertNotNull(bundleDependenciesWithVersion); Assert.assertNotNull(reexportedDependencies); Assert.assertNotNull(greedyDependencies); Assert.assertNotNull(optionalDependencies); final PapyrusBundleDescription bundleToCheck = PapyrusBundleDescriptionRegistry.INSTANCE.getPapyrusBundleDescription(bundleSymbolicNameToCheck); Assert.assertNotNull(NLS.bind("The bundle {0} has not been found.", bundleSymbolicNameToCheck), bundleToCheck); final Set<String> expectedDependencies = bundleDependenciesWithVersion.keySet(); Assert.assertEquals("The current dependencies are not the expected ones.", expectedDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getDependencies())); Assert.assertEquals("The current reexported dependencies are not the expected ones.", reexportedDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getReexportedDependencies())); Assert.assertEquals("The current greedy dependencies are not the expected ones.", greedyDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getGreedyDependencies())); Assert.assertEquals("The current optional dependencies are not the expected ones.", optionalDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getOptionalDependencies())); for (final Entry<String, Version> current : bundleDependenciesWithVersion.entrySet()) { Assert.assertTrue(NLS.bind("The dependency {0} is not registered with compatibale version range", current.getKey()), bundleToCheck.getRegisteredDependencyVersion(current.getKey()).inIncludedIn(current.getValue())); } }

Target:
private void strictCheckOfDependenciesList(final String bundleSymbolicNameToCheck, final Map<String, Version> bundleDependenciesWithVersion, final Set<String> reexportedDependencies, final Set<String> greedyDependencies, final Set<String> optionalDependencies) { Assert.assertNotNull(bundleSymbolicNameToCheck); Assert.assertNotNull(bundleDependenciesWithVersion); Assert.assertNotNull(reexportedDependencies); Assert.assertNotNull(greedyDependencies); Assert.assertNotNull(optionalDependencies); final PapyrusBundleDescription bundleToCheck = PapyrusBundleDescriptionRegistry.INSTANCE.getPapyrusBundleDescription(bundleSymbolicNameToCheck); Assert.assertNotNull(NLS.bind("The bundle {0} has not been found.", bundleSymbolicNameToCheck), bundleToCheck); final Set<String> expectedDependencies = bundleDependenciesWithVersion.keySet(); Assert.assertEquals("The current dependencies are not the expected ones.", expectedDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getDependencies())); Assert.assertEquals("The current reexported dependencies are not the expected ones.", reexportedDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getReexportedDependencies())); Assert.assertEquals("The current greedy dependencies are not the expected ones.", greedyDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getGreedyDependencies())); Assert.assertEquals("The current optional dependencies are not the expected ones.", optionalDependencies, PapyrusBundleDescription.asSymbolicNameSet(bundleToCheck.getOptionalDependencies())); for (final Entry<String, Version> current : bundleDependenciesWithVersion.entrySet()) { Assert.assertTrue(NLS.bind("The dependency {0} is not registered with compatible version range", current.getKey()), bundleToCheck.getRegisteredDependencyVersion(current.getKey()).inIncludedIn(current.getValue())); } }