FELIX-4334: Added getBundle method, which is needed by "ModifiedBundleDependencyTest" test.


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1546537 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/common/TestBase.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/common/TestBase.java
index 9744d16..a839dce 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/common/TestBase.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/integration/common/TestBase.java
@@ -198,8 +198,6 @@
      * 
      * @param symbolicName
      *            the symbolic name of the bundle to be stopped.
-     * @param context
-     *            the context used to lookup all installed bundles.
      */
     protected void stopBundle(String symbolicName) {
         // Stop the test.annotation bundle
@@ -220,6 +218,21 @@
     }
 
     /**
+     * Helper method used to get a given bundle.
+     * 
+     * @param symbolicName
+     *            the symbolic name of the bundle to get.
+     */
+    protected Bundle getBundle(String symbolicName) {
+        for (Bundle b : context.getBundles()) {
+            if (b.getSymbolicName().equals(symbolicName)) {
+                return b;
+            }
+        }
+        throw new IllegalStateException("bundle " + symbolicName + " not found");
+    }
+
+    /**
      * Stops our test bundle.
      */
     protected void stopTestBundle() {