diff --git a/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/Common.java b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/Common.java
index c51f593..161ea5e 100644
--- a/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/Common.java
+++ b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/Common.java
@@ -30,6 +30,7 @@
 import org.ops4j.pax.tinybundles.core.TinyBundles;
 import org.osgi.framework.Constants;
 import org.ow2.chameleon.testing.helpers.BaseTest;
+import org.ow2.chameleon.testing.helpers.FrameworkHelper;
 import org.ow2.chameleon.testing.tinybundles.ipojo.IPOJOStrategy;
 
 import java.io.*;
@@ -294,4 +295,8 @@
             return null;
         }
     }
+
+    public boolean isEquinox() {
+        return FrameworkHelper.isEquinox(context)  || context.toString().contains("eclipse");
+    }
 }
diff --git a/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestBeingConsumedByEquinoxSCR1_4_100.java b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestBeingConsumedByEquinoxSCR1_4_100.java
new file mode 100644
index 0000000..2f7afa5
--- /dev/null
+++ b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestBeingConsumedByEquinoxSCR1_4_100.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.ipojo.test.compatibility;
+
+import org.apache.felix.ipojo.test.compatibility.service.CheckService;
+import org.junit.Test;
+import org.ops4j.pax.exam.Option;
+
+import static org.fest.assertions.Assertions.assertThat;
+import static org.ops4j.pax.exam.CoreOptions.bundle;
+
+/**
+ * Check a configuration using Equinox SCR 1.4.100 (Declarative Services).
+ * iPOJO provider is consumed by a component using SCR.
+ *
+ *
+ * This test is intended to pass on Equinox only.
+ */
+public class TestBeingConsumedByEquinoxSCR1_4_100 extends Common {
+
+    public static String DS_URL = "http://www.dynamis-technologies.com/ipojo/bundles/org.eclipse.equinox.ds_1.4.100" +
+            ".v20130515-2026.jar";
+
+    public static String UTILS_URL = "http://www.dynamis-technologies.com/ipojo/bundles/org.eclipse.equinox.util_1.0" +
+            ".500.v20130404-1337.jar";
+
+    @Override
+    public Option[] bundles() {
+        return new Option[] {
+                bundle(DS_URL),
+                bundle(UTILS_URL),
+                iPOJOHelloProvider(),
+                SCRHelloConsumer()
+        };
+    }
+
+    @Test
+    public void test() {
+        if (! isEquinox()) {
+            System.out.println("Test executed on Equinox only");
+            return;
+        }
+        CheckService checker = osgiHelper.getServiceObject(CheckService.class);
+        assertThat(checker).isNotNull();
+        assertThat(checker.data().get("result")).isEqualTo("hello john doe");
+    }
+}
diff --git a/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestConsumingProviderUsingEquinoxSCR1_4_100.java b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestConsumingProviderUsingEquinoxSCR1_4_100.java
new file mode 100644
index 0000000..63f3c98
--- /dev/null
+++ b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestConsumingProviderUsingEquinoxSCR1_4_100.java
@@ -0,0 +1,65 @@
+/*
+ * 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.ipojo.test.compatibility;
+
+import org.apache.felix.ipojo.test.compatibility.service.CheckService;
+import org.junit.Test;
+import org.ops4j.pax.exam.Option;
+
+import static org.fest.assertions.Assertions.assertThat;
+import static org.ops4j.pax.exam.CoreOptions.bundle;
+import static org.ops4j.pax.exam.CoreOptions.maven;
+
+/**
+ * Check a configuration using Equinox SCR 1.4.100 (Declarative Services).
+ * iPOJO consumer is bound to a Hello Service implementation using SCR.
+ *
+ *
+ * This test is intended to pass on Equinox only.
+ */
+public class TestConsumingProviderUsingEquinoxSCR1_4_100 extends Common {
+
+    public static String DS_URL = "http://www.dynamis-technologies.com/ipojo/bundles/org.eclipse.equinox.ds_1.4.100" +
+            ".v20130515-2026.jar";
+
+    public static String UTILS_URL = "http://www.dynamis-technologies.com/ipojo/bundles/org.eclipse.equinox.util_1.0" +
+            ".500.v20130404-1337.jar";
+
+    @Override
+    public Option[] bundles() {
+        return new Option[] {
+                bundle(DS_URL),
+                bundle(UTILS_URL),
+                SCRHelloProvider(),
+                iPOJOHelloConsumer()
+        };
+    }
+
+    @Test
+    public void test() {
+        if (! isEquinox()) {
+            System.out.println("Test executed on Equinox only");
+            return;
+        }
+        CheckService checker = osgiHelper.getServiceObject(CheckService.class);
+        assertThat(checker).isNotNull();
+        assertThat(checker.data().get("result")).isEqualTo("hello john doe");
+    }
+}
