diff --git a/dependencymanager/test/annotation/src/main/java/org/apache/felix/dm/test/annotation/AspectTest.java b/dependencymanager/test/annotation/src/main/java/org/apache/felix/dm/test/annotation/AspectTest.java
new file mode 100644
index 0000000..1ee6ecc
--- /dev/null
+++ b/dependencymanager/test/annotation/src/main/java/org/apache/felix/dm/test/annotation/AspectTest.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.dm.test.annotation;
+
+import org.apache.felix.dm.annotation.api.AspectService;
+import org.apache.felix.dm.annotation.api.Param;
+import org.apache.felix.dm.annotation.api.Service;
+import org.apache.felix.dm.annotation.api.ServiceDependency;
+import org.osgi.framework.Constants;
+
+@Service
+public class AspectTest
+{
+    public interface ServiceInterface
+    {
+        public void run();
+    }
+
+    @ServiceDependency
+    void bind(ServiceInterface service)
+    {
+        service.run();
+    }
+
+    @Service
+    public static class ServiceProvider implements ServiceInterface
+    {
+        @ServiceDependency(filter = "(test=aspect.ServiceProvider)")
+        protected Sequencer m_sequencer;
+
+        public void run()
+        {
+            m_sequencer.step(1);
+        }
+    }
+
+    @AspectService(filter = "(!(" + Constants.SERVICE_RANKING + "=*))", properties = { @Param(name = Constants.SERVICE_RANKING, value = "1") })
+    public static class ServiceProviderAspect implements ServiceInterface
+    {
+        @ServiceDependency(filter = "(test=aspect.ServiceProviderAspect)")
+        protected Sequencer m_sequencer;
+
+        public void run()
+        {
+            m_sequencer.step(2);
+        }
+    }
+}
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AnnotationTest.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AnnotationTest.java
index f208418..7701645 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AnnotationTest.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/AnnotationTest.java
@@ -123,6 +123,23 @@
         m_ensure.waitForStep(5, 15000);
     }
 
+    @Test
+    public void testAspectAnnotation(BundleContext context)
+    {
+        m_ensure = new Ensure();
+        DependencyManager m = new DependencyManager(context);
+        // We provide ourself as a "Sequencer" service: this will active the org.apache.felix.dependencymanager.test.annotation.AspectTest service
+        Dictionary props = new Hashtable() {{ put("test", "aspect.ServiceProvider"); }};
+        m.add(m.createService().setImplementation(this).setInterface(Sequencer.class.getName(), props));
+        // Check if the ServiceProvider has been injected in the AspectTest service.
+        m_ensure.waitForStep(1, 10000);
+        // Provide the Sequencer for activating the ServiceProviderAspect service
+        props = new Hashtable() {{ put("test", "aspect.ServiceProviderAspect"); }};
+        m.add(m.createService().setImplementation(this).setInterface(Sequencer.class.getName(), props));
+        // And check if the AspectTest has been injected with the aspect
+        m_ensure.waitForStep(2, 10000);
+    }
+
     private void sleep(int i)
     {
         try {
