Updated tests to new annotation API.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@918523 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AspectTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AspectTest.java
index 2446c70..c3f8f26 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AspectTest.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AspectTest.java
@@ -22,8 +22,6 @@
 import static org.ops4j.pax.exam.CoreOptions.options;
 import static org.ops4j.pax.exam.CoreOptions.provision;
 
-import java.util.Properties;
-
 import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.service.Service;
 import org.junit.Test;
@@ -32,7 +30,6 @@
 import org.ops4j.pax.exam.junit.Configuration;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
 
 @RunWith(JUnit4TestRunner.class)
 public class AspectTest extends Base {
@@ -55,7 +52,7 @@
         Service sp = m.createService().setImplementation(new ServiceProvider(e)).setInterface(ServiceInterface.class.getName(), null);
         Service sp2 = m.createService().setImplementation(new ServiceProvider2(e)).setInterface(ServiceInterface2.class.getName(), null);
         Service sc = m.createService().setImplementation(new ServiceConsumer(e)).add(m.createServiceDependency().setService(ServiceInterface.class).setRequired(true));
-        Service sa = m.createAspectService(ServiceInterface.class, "(|(!(" + Constants.SERVICE_RANKING + "=*))(" + Constants.SERVICE_RANKING + "<=0))", new ServiceAspect(e), new Properties() {{ put(Constants.SERVICE_RANKING, Integer.valueOf(1)); }} );
+        Service sa = m.createAspectService(ServiceInterface.class, null, 1, new ServiceAspect(e), null);
         m.add(sc);
         m.add(sp);
         e.waitForStep(3, 15000);
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleDependencyTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleDependencyTest.java
index 40e06a8..bd548ca 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleDependencyTest.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleDependencyTest.java
@@ -79,7 +79,13 @@
         
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
-        Service consumerWithFilter = m.createService().setImplementation(new FilteredConsumerRequired(e)).add(m.createBundleDependency().setRequired(true).setFilter("(Bundle-SymbolicName=org.apache.felix.dependencymanager)").setCallbacks("add", "remove"));
+        Service consumerWithFilter = m.createService()
+            .setImplementation(new FilteredConsumerRequired(e))
+            .add(m.createBundleDependency()
+                .setRequired(true)
+                .setFilter("(Bundle-SymbolicName=org.apache.felix.dependencymanager)")
+                .setCallbacks("add", "remove")
+                );
         // add a consumer with a filter
         m.add(consumerWithFilter);
         e.waitForStep(1, 10000);
@@ -133,7 +139,8 @@
         }
         
         public void add(Bundle b) {
-            Assert.assertNotNull(b);
+            System.out.println("Bundle is " + b);
+//            Assert.assertNotNull(b);
             if (b.getSymbolicName().equals("org.apache.felix.dependencymanager")) {
                 m_ensure.step(1);
             }
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FELIX2078_ServiceDependencyTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FELIX2078_ServiceDependencyTest.java
index 2d0d90a..199cf9b 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FELIX2078_ServiceDependencyTest.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/FELIX2078_ServiceDependencyTest.java
@@ -54,6 +54,7 @@
         Service sc = m.createService().setImplementation(new ServiceConsumer(e)).add(m.createServiceDependency().setService(ServiceInterface.class).setRequired(true).setCallbacks("add", "remove"));
         m.add(sp);
         m.add(sp2);
+        System.out.println("test");
         m.add(sc);
         // wait until both services have been added to our consumer
         e.waitForStep(2, 5000);
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/MultipleAnnotationTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/MultipleAnnotationTest.java
index 138f0d1..e7b9b6b 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/MultipleAnnotationTest.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/annotation/MultipleAnnotationTest.java
@@ -62,7 +62,9 @@
     {
         DependencyManager m = new DependencyManager(context);
         // Provide the Sequencer service to the MultipleAnnotationTest class.
-        m.add(m.createService().setImplementation(this).setInterface(Sequencer.class.getName(), null));
+        m.add(m.createService()
+            .setImplementation(this)
+            .setInterface(Sequencer.class.getName(), null));
         // Check if the test.annotation components have been initialized orderly
         m_ensure.waitForStep(7, 10000);
         // Stop the test.annotation bundle