diff --git a/ipojo/runtime/api-it/pom.xml b/ipojo/runtime/api-it/pom.xml
new file mode 100644
index 0000000..af7748f
--- /dev/null
+++ b/ipojo/runtime/api-it/pom.xml
@@ -0,0 +1,468 @@
+<!--
+  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.
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>felix-parent</artifactId>
+        <version>1.2.1</version>
+        <relativePath>../../../pom/pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.apache.felix.ipojo.runtime.api-it</artifactId>
+    <version>1.9.0-SNAPSHOT</version>
+    <name>Apache Felix iPOJO Runtime Project ~ API Integration Tests</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>.</directory>
+                <targetPath>META-INF</targetPath>
+                <includes>
+                    <include>LICENSE*</include>
+                    <include>NOTICE*</include>
+                    <include>DEPENDENCIES*</include>
+                </includes>
+            </resource>
+        </resources>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.5.1</version>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>depends-maven-plugin</artifactId>
+                <version>1.2</version>
+                <executions>
+                    <execution>
+                        <id>generate-config</id>
+                        <goals>
+                            <goal>generate-depends-file</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+
+    </build>
+
+    <properties>
+        <exam.version>3.1.0-SNAPSHOT</exam.version>
+        <url.version>1.5.1</url.version>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-native</artifactId>
+            <version>${exam.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit4</artifactId>
+            <version>${exam.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-link-mvn</artifactId>
+            <version>${exam.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-aether</artifactId>
+            <version>${url.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.framework</artifactId>
+            <version>4.2.0</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+            <version>0.9.6</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>0.9.6</version>
+            <scope>test</scope>
+        </dependency>
+
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.9</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>1.9.5</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.tinybundles</groupId>
+            <artifactId>tinybundles</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo</artifactId>
+            <version>1.9.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.api</artifactId>
+            <version>1.9.0-SNAPSHOT</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.composite</artifactId>
+            <version>1.9.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.manipulator</artifactId>
+            <version>1.9.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <version>1.6.0</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.handler.whiteboard</artifactId>
+            <version>1.4.0</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.4</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ow2.chameleon.testing</groupId>
+            <artifactId>osgi-helpers</artifactId>
+            <version>0.6.0</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ow2.chameleon.testing</groupId>
+            <artifactId>tinybundles-ipojo</artifactId>
+            <version>0.3.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.handler.eventadmin</artifactId>
+            <!--
+            We use the released version as we don't really have to do any behavioral test on the handler in the core
+            test.
+            -->
+            <version>1.8.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.log</artifactId>
+            <version>1.0.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-wrap</artifactId>
+            <version>1.5.2</version>
+        </dependency>
+    </dependencies>
+
+    <profiles>
+        <profile>
+            <id>release</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>make-assembly</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                                <configuration>
+                                    <descriptorRefs>
+                                        <descriptorRef>project</descriptorRef>
+                                    </descriptorRefs>
+                                    <!-- we don't want to attach all the assemblies, such as bz2 -->
+                                    <attach>false</attach>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <!-- only attach the project and bin assemblies, in tar.gz and zip flavors -->
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>build-helper-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>attach-assemblies</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>attach-artifact</goal>
+                                </goals>
+                                <configuration>
+                                    <artifacts>
+                                        <artifact>
+                                            <file>
+                                                ${project.build.directory}/${project.artifactId}-${project.version}-project.tar.gz
+                                            </file>
+                                            <classifier>project</classifier>
+                                            <type>tar.gz</type>
+                                        </artifact>
+                                        <artifact>
+                                            <file>
+                                                ${project.build.directory}/${project.artifactId}-${project.version}-project.zip
+                                            </file>
+                                            <classifier>project</classifier>
+                                            <type>zip</type>
+                                        </artifact>
+                                    </artifacts>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>knopflerfish</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <property>
+                    <name>pax.exam.framework</name>
+                    <value>knopflerfish</value>
+                </property>
+            </activation>
+            <properties>
+                <pax.exam.framework>knopflerfish</pax.exam.framework>
+            </properties>
+            <repositories>
+                <repository>
+                    <id>knopflerfish-releases</id>
+                    <url>http://www.knopflerfish.org/maven2</url>
+                </repository>
+            </repositories>
+            <dependencies>
+                <dependency>
+                    <groupId>org.knopflerfish</groupId>
+                    <artifactId>framework</artifactId>
+                    <version>5.2.0</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+
+        <profile>
+            <id>equinox</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <property>
+                    <name>pax.exam.framework</name>
+                    <value>equinox</value>
+                </property>
+            </activation>
+            <properties>
+                <pax.exam.framework>equinox</pax.exam.framework>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.eclipse.tycho</groupId>
+                    <artifactId>org.eclipse.osgi</artifactId>
+                    <version>3.8.1.v20120830-144521</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+
+        <profile>
+            <id>felix</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <property>
+                    <name>pax.exam.framework</name>
+                    <value>felix</value>
+                </property>
+            </activation>
+            <properties>
+                <pax.exam.framework>felix</pax.exam.framework>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.apache.felix.framework</artifactId>
+                    <version>4.2.0</version>
+                    <scope>test</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+
+        <profile>
+            <id>test</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-invoker-plugin</artifactId>
+                        <version>1.8</version>
+                        <configuration>
+                            <streamLogs>true</streamLogs>
+                            <goals>
+                                <goal>clean</goal>
+                                <goal>test</goal>
+                            </goals>
+                            <cloneClean>true</cloneClean>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>regular</id>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <profiles>
+                                        <profile>felix</profile>
+                                    </profiles>
+                                    <cloneProjectsTo>${project.build.directory}/regular</cloneProjectsTo>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
+            <id>test-all</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-invoker-plugin</artifactId>
+                        <version>1.8</version>
+                        <configuration>
+                            <streamLogs>true</streamLogs>
+                            <goals>
+                                <goal>clean</goal>
+                                <goal>test</goal>
+                            </goals>
+                            <cloneClean>true</cloneClean>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>equinox-native</id>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <profiles>
+                                        <profile>equinox</profile>
+                                    </profiles>
+                                    <cloneProjectsTo>${project.build.directory}/equinox-native</cloneProjectsTo>
+
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>felix-native</id>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <profiles>
+                                        <profile>felix</profile>
+                                    </profiles>
+                                    <cloneProjectsTo>${project.build.directory}/felix-native</cloneProjectsTo>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>knopflerfish-native</id>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <profiles>
+                                        <profile>knopflerfish</profile>
+                                    </profiles>
+                                    <cloneProjectsTo>${project.build.directory}/knopflerfish-native</cloneProjectsTo>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/pom.xml b/ipojo/runtime/api-it/src/it/ipojo-api-test/pom.xml
new file mode 100644
index 0000000..ae55600
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/pom.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>org.apache.felix.ipojo.runtime.api-it</artifactId>
+        <version>1.9.0-SNAPSHOT</version>
+        <relativePath>../../../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.felix</groupId>
+    <artifactId>ipojo-api-test</artifactId>
+
+    <name>${project.artifactId}</name>
+    
+</project>
\ No newline at end of file
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/FooImpl.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/FooImpl.java
new file mode 100644
index 0000000..1a04e64
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/FooImpl.java
@@ -0,0 +1,22 @@
+package org.apache.felix.ipojo.runtime.core.api.components;
+
+import org.apache.felix.ipojo.runtime.core.api.services.Foo;
+
+public class FooImpl implements Foo {
+    
+   // private List<String> m_list = new ArrayList<String>();
+
+    public void doSomething() {
+       // Do something...
+        System.out.println("Hello World !");
+    }
+    
+    public FooImpl(String s) {
+        _setIM(s);
+    }
+    
+    public void _setIM(String s) {
+        
+    }
+
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/HostImpl.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/HostImpl.java
new file mode 100644
index 0000000..ea92fc3
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/HostImpl.java
@@ -0,0 +1,19 @@
+package org.apache.felix.ipojo.runtime.core.api.components;
+
+import org.osgi.framework.ServiceReference;
+
+public class HostImpl {
+    
+    public void arrival(ServiceReference ref) {
+        
+    }
+    
+    public void departure(ServiceReference ref) {
+        
+    }
+    
+    public void modification(ServiceReference ref) {
+        
+    }
+
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/MyComponentImpl.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/MyComponentImpl.java
new file mode 100644
index 0000000..8c58fe3
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/MyComponentImpl.java
@@ -0,0 +1,31 @@
+package org.apache.felix.ipojo.runtime.core.api.components;
+
+import org.apache.felix.ipojo.annotations.Component;
+import org.apache.felix.ipojo.runtime.core.api.services.Foo;
+
+/**
+ * This class is marked as a component to be manipulated.
+ */
+@Component(name="do-not-use-this-factory", public_factory = false)
+public class MyComponentImpl {
+    
+    private Foo myFoo;
+    
+    private int anInt;
+    
+    public MyComponentImpl() {
+        anInt = 2;
+    }
+    
+    public MyComponentImpl(int i) {
+        anInt = i;
+    }
+
+    public void start() {
+       myFoo.doSomething();
+       if (anInt > 0) {
+           System.out.println("Set int to " + anInt);
+       }
+    }
+
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/MyServiceImpl.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/MyServiceImpl.java
new file mode 100644
index 0000000..d6176e9
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/MyServiceImpl.java
@@ -0,0 +1,9 @@
+package org.apache.felix.ipojo.runtime.core.api.components;
+
+import org.apache.felix.ipojo.runtime.core.api.services.MyService;
+
+public class MyServiceImpl implements MyService {
+    public double compute(double value) {
+	return Math.exp(value * Math.cosh(value));
+    }
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/BarService.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/BarService.java
new file mode 100644
index 0000000..e42f3f3
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/BarService.java
@@ -0,0 +1,8 @@
+package org.apache.felix.ipojo.runtime.core.api.services;
+
+public interface BarService {
+    
+    public void doSomethingWithBar();
+    
+
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/Foo.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/Foo.java
new file mode 100644
index 0000000..84c9127
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/Foo.java
@@ -0,0 +1,8 @@
+package org.apache.felix.ipojo.runtime.core.api.services;
+
+public interface Foo {
+    
+    
+    public void doSomething();
+
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/MyService.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/MyService.java
new file mode 100644
index 0000000..b7372ae
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/MyService.java
@@ -0,0 +1,5 @@
+package org.apache.felix.ipojo.runtime.core.api.services;
+
+public interface MyService {
+    double compute(double value);
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/Common.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/Common.java
new file mode 100644
index 0000000..def3d91
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/Common.java
@@ -0,0 +1,302 @@
+package org.apache.felix.ipojo.runtime.core.api;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.Logger;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.filefilter.TrueFileFilter;
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.ServiceContext;
+import org.apache.felix.ipojo.composite.CompositeManager;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.options.CompositeOption;
+import org.ops4j.pax.exam.options.DefaultCompositeOption;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerMethod;
+import org.ops4j.pax.tinybundles.core.TinyBundle;
+import org.ops4j.pax.tinybundles.core.TinyBundles;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+import org.ow2.chameleon.testing.helpers.IPOJOHelper;
+import org.ow2.chameleon.testing.helpers.OSGiHelper;
+import org.ow2.chameleon.testing.tinybundles.ipojo.IPOJOStrategy;
+import org.slf4j.LoggerFactory;
+
+import javax.inject.Inject;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import static junit.framework.Assert.fail;
+import static org.ops4j.pax.exam.CoreOptions.*;
+
+/**
+ * Bootstrap the test from this project
+ */
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerMethod.class)
+public class Common {
+
+    @Inject
+    protected
+    BundleContext bc;
+    protected OSGiHelper osgiHelper;
+    protected IPOJOHelper ipojoHelper;
+    protected boolean deployTestedBundle = true;
+
+    public static Option junitAndMockitoBundles() {
+        return new DefaultCompositeOption(
+                // Repository required to load harmcrest (OSGi-fied version).
+                repository("http://repository.springsource.com/maven/bundles/external").id(
+                        "com.springsource.repository.bundles.external"),
+
+                // Mockito without Hamcrest and Objenesis
+                mavenBundle("org.mockito", "mockito-core", "1.9.5"),
+
+                // Hamcrest with a version matching the range expected by Mockito
+                mavenBundle("org.hamcrest", "com.springsource.org.hamcrest.core", "1.1.0"),
+
+                // Objenesis with a version matching the range expected by Mockito
+                wrappedBundle(mavenBundle("org.objenesis", "objenesis", "1.2"))
+                        .exports("*;version=1.2"),
+
+                // The default JUnit bundle also exports Hamcrest, but with an (incorrect) version of
+                // 4.9 which does not match the Mockito import.
+                CoreOptions.junitBundles(),
+
+                /*
+                 * Felix has implicit boot delegation enabled by default. It conflicts with Mockito:
+                 * java.lang.LinkageError: loader constraint violation in interface itable initialization:
+                 * when resolving method "org.osgi.service.useradmin.User$$EnhancerByMockitoWithCGLIB$$dd2f81dc
+                 * .newInstance(Lorg/mockito/cglib/proxy/Callback;)Ljava/lang/Object;" the class loader
+                 * (instance of org/mockito/internal/creation/jmock/SearchingClassLoader) of the current class,
+                 * org/osgi/service/useradmin/User$$EnhancerByMockitoWithCGLIB$$dd2f81dc, and the class loader
+                 * (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) for interface
+                 * org/mockito/cglib/proxy/Factory have different Class objects for the type org/mockito/cglib/
+                 * proxy/Callback used in the signature
+                 *
+                 * So we disable the bootdelegation.
+                 */
+                frameworkProperty("felix.bootdelegation.implicit").value("false")
+        );
+    }
+
+    public static ServiceContext getServiceContext(ComponentInstance ci) {
+        if (ci instanceof CompositeManager) {
+            return ((CompositeManager) ci).getServiceContext();
+        } else {
+            throw new RuntimeException("Cannot get the service context from a non composite instance");
+        }
+    }
+
+    @Configuration
+    public Option[] config() throws IOException {
+        Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
+        root.setLevel(Level.INFO);
+
+        if (deployTestedBundle) {
+            return options(
+                    cleanCaches(),
+                    ipojoBundles(),
+                    junitBundles(),
+                    testedBundle(),
+                    systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("WARN")
+            );
+        } else {
+            return options(
+                    cleanCaches(),
+                    ipojoBundles(),
+                    junitBundles(),
+                    systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("WARN")
+            );
+        }
+    }
+
+    @Before
+    public void commonSetUp() {
+        osgiHelper = new OSGiHelper(bc);
+        ipojoHelper = new IPOJOHelper(bc);
+
+        // Dump OSGi Framework information
+        String vendor = (String) osgiHelper.getBundle(0).getHeaders().get(Constants.BUNDLE_VENDOR);
+        if (vendor == null) {
+            vendor = (String) osgiHelper.getBundle(0).getHeaders().get(Constants.BUNDLE_SYMBOLICNAME);
+        }
+        String version = (String) osgiHelper.getBundle(0).getHeaders().get(Constants.BUNDLE_VERSION);
+        System.out.println("OSGi Framework : " + vendor + " - " + version);
+
+        waitForStability(bc);
+    }
+
+    @After
+    public void commonTearDown() {
+        ipojoHelper.dispose();
+        osgiHelper.dispose();
+    }
+
+    public BundleContext getContext() {
+        return bc;
+    }
+
+    public CompositeOption ipojoBundles() {
+        return new DefaultCompositeOption(
+                mavenBundle("org.apache.felix", "org.apache.felix.ipojo").versionAsInProject(),
+                mavenBundle("org.apache.felix", "org.apache.felix.ipojo.composite").versionAsInProject(),
+                mavenBundle("org.apache.felix", "org.apache.felix.ipojo.api").versionAsInProject(),
+                mavenBundle("org.ow2.chameleon.testing", "osgi-helpers").versionAsInProject(),
+                // configuration admin
+                mavenBundle("org.apache.felix", "org.apache.felix.configadmin").versionAsInProject(),
+                // whiteboard pattern handler
+                mavenBundle("org.apache.felix", "org.apache.felix.ipojo.handler.whiteboard").versionAsInProject()
+        );
+    }
+
+    public Option testedBundle() throws MalformedURLException {
+        File out = new File("target/tested/bundle.jar");
+        if (out.exists()) {
+            return bundle(out.toURI().toURL().toExternalForm());
+        }
+
+        TinyBundle tested = TinyBundles.bundle();
+
+        // We look inside target/classes to find the class and resources
+        File classes = new File("target/classes");
+        Collection<File> files = FileUtils.listFilesAndDirs(classes, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE);
+        List<File> services = new ArrayList<File>();
+        for (File file : files) {
+            if (file.isDirectory()) {
+                // By convention we export of .services and .service package
+                if (file.getName().endsWith("services") || file.getName().endsWith("service")) {
+                    services.add(file);
+                }
+            } else {
+                // We need to compute the path
+                String path = file.getAbsolutePath().substring(classes.getAbsolutePath().length() + 1);
+                tested.add(path, file.toURI().toURL());
+                System.out.println(file.getName() + " added to " + path);
+            }
+        }
+
+        // Export the components and services
+        String export = "org.apache.felix.ipojo.runtime.core.api.components";
+        for (File file : services) {
+            if (export.length() > 0) {
+                export += ", ";
+            }
+            String path = file.getAbsolutePath().substring(classes.getAbsolutePath().length() + 1);
+            String packageName = path.replace('/', '.');
+            export += packageName;
+        }
+
+        System.out.println("Exported packages : " + export);
+
+        InputStream inputStream = tested
+                .set(Constants.BUNDLE_SYMBOLICNAME, "test.bundle")
+                .set(Constants.IMPORT_PACKAGE, "*")
+                .set(Constants.EXPORT_PACKAGE, export)
+                .build(IPOJOStrategy.withiPOJO(new File("src/main/resources")));
+
+        try {
+            org.apache.commons.io.FileUtils.copyInputStreamToFile(inputStream, out);
+            return bundle(out.toURI().toURL().toExternalForm());
+        } catch (MalformedURLException e) {
+            throw new RuntimeException("Cannot compute the url of the manipulated bundle");
+        } catch (IOException e) {
+            throw new RuntimeException("Cannot write of the manipulated bundle");
+        }
+    }
+
+    public void assertContains(String s, String[] arrays, String object) {
+        for (String suspect : arrays) {
+            if (object.equals(suspect)) {
+                return;
+            }
+        }
+        fail("Assertion failed : " + s);
+    }
+
+    /**
+     * Waits for stability:
+     * <ul>
+     * <li>all bundles are activated
+     * <li>service count is stable
+     * </ul>
+     * If the stability can't be reached after a specified time,
+     * the method throws a {@link IllegalStateException}.
+     *
+     * @param context the bundle context
+     * @throws IllegalStateException when the stability can't be reach after a several attempts.
+     */
+    private void waitForStability(BundleContext context) throws IllegalStateException {
+        // Wait for bundle initialization.
+        boolean bundleStability = getBundleStability(context);
+        int count = 0;
+        while (!bundleStability && count < 500) {
+            try {
+                Thread.sleep(5);
+            } catch (InterruptedException e) {
+                // Interrupted
+            }
+            count++;
+            bundleStability = getBundleStability(context);
+        }
+
+        if (count == 500) {
+            System.err.println("Bundle stability isn't reached after 500 tries");
+            throw new IllegalStateException("Cannot reach the bundle stability");
+        }
+
+        boolean serviceStability = false;
+        count = 0;
+        int count1 = 0;
+        int count2 = 0;
+        while (!serviceStability && count < 500) {
+            try {
+                ServiceReference[] refs = context.getServiceReferences((String) null, null);
+                count1 = refs.length;
+                Thread.sleep(500);
+                refs = context.getServiceReferences((String) null, null);
+                count2 = refs.length;
+                serviceStability = count1 == count2;
+            } catch (Exception e) {
+                System.err.println(e);
+                serviceStability = false;
+                // Nothing to do, while recheck the condition
+            }
+            count++;
+        }
+
+        if (count == 500) {
+            System.err.println("Service stability isn't reached after 500 tries (" + count1 + " != " + count2);
+            throw new IllegalStateException("Cannot reach the service stability");
+        }
+    }
+
+    /**
+     * Are bundle stables.
+     *
+     * @param bc the bundle context
+     * @return <code>true</code> if every bundles are activated.
+     */
+    private boolean getBundleStability(BundleContext bc) {
+        boolean stability = true;
+        Bundle[] bundles = bc.getBundles();
+        for (int i = 0; i < bundles.length; i++) {
+            stability = stability && (bundles[i].getState() == Bundle.ACTIVE);
+        }
+        return stability;
+    }
+
+
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/CompositeTest.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/CompositeTest.java
new file mode 100644
index 0000000..1a8f518
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/CompositeTest.java
@@ -0,0 +1,228 @@
+package org.apache.felix.ipojo.runtime.core.api;
+
+import org.apache.felix.ipojo.*;
+import org.apache.felix.ipojo.api.Dependency;
+import org.apache.felix.ipojo.api.PrimitiveComponentType;
+import org.apache.felix.ipojo.api.Service;
+import org.apache.felix.ipojo.api.composite.*;
+import org.apache.felix.ipojo.runtime.core.api.components.FooImpl;
+import org.apache.felix.ipojo.runtime.core.api.components.MyComponentImpl;
+import org.apache.felix.ipojo.runtime.core.api.services.Foo;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.junit.Assert.assertThat;
+
+
+public class CompositeTest extends Common {
+
+    private BundleContext context;
+
+    @Before
+    public void setUp() {
+        context = getContext();
+    }
+
+    @Test
+    public void createACompositeWithcontainedInstance() throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException {
+        // Define the component types
+        PrimitiveComponentType prov = createAProvider();
+        PrimitiveComponentType cons = createAConsumer();
+
+        CompositeComponentType type = new CompositeComponentType()
+                .setBundleContext(context)
+                .setComponentTypeName("comp1")
+                .addInstance(new Instance(prov.getFactory().getName()))
+                .addInstance(new Instance(cons.getFactory().getName()));
+
+        ComponentInstance ci = type.createInstance();
+
+        assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));
+
+        // Stop cons
+        cons.stop();
+        assertThat("ci is invalid", ci.getState(), is(ComponentInstance.INVALID));
+
+        // Restart cons
+        cons.start();
+        assertThat("ci is valid - 2", ci.getState(), is(ComponentInstance.VALID));
+
+    }
+
+    @Test
+    public void createACompositeWithAnInstantiatedService() throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException {
+        // Define the component types
+        PrimitiveComponentType prov = createAProvider();
+        prov.start();
+        PrimitiveComponentType cons = createAConsumer();
+
+        ServiceReference[] refs = osgiHelper.getServiceReferences(Factory.class.getName(),
+                "(component.providedServiceSpecifications=" + Foo.class.getName() + ")");
+        assertThat(refs.length, is(not(0)));
+
+        Factory factory = (Factory) osgiHelper.getServiceObject(refs[0]);
+        System.out.println(factory.getComponentDescription().getDescription());
+
+        CompositeComponentType type = new CompositeComponentType()
+                .setBundleContext(context)
+                .setComponentTypeName("comp2")
+                .addSubService(new InstantiatedService().setSpecification(Foo.class.getName()))
+                .addInstance(new Instance(cons.getFactory().getName()));
+
+        ComponentInstance ci = type.createInstance();
+
+        System.out.println(ci.getInstanceDescription().getDescription());
+
+        assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));
+
+        // Stop prov
+        prov.stop();
+        assertThat("ci is invalid", ci.getState(), is(ComponentInstance.INVALID));
+
+        // Restart prov
+        prov.start();
+        assertThat("ci is valid - 2", ci.getState(), is(ComponentInstance.VALID));
+
+    }
+
+    @Test
+    public void createACompositeWithAnOptionalInstantiatedService() throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException {
+        // Define the component types
+        PrimitiveComponentType prov = createAProvider();
+        prov.start();
+
+        CompositeComponentType type = new CompositeComponentType()
+                .setBundleContext(context)
+                .setComponentTypeName("comp3")
+                .addSubService(new InstantiatedService().setSpecification(Foo.class.getName()).setOptional(true));
+
+        ComponentInstance ci = type.createInstance();
+
+        assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));
+
+        // Stop prov
+        prov.stop();
+        assertThat("ci is valid - 1", ci.getState(), is(ComponentInstance.VALID));
+
+        // Restart prov
+        prov.start();
+        assertThat("ci is valid - 2", ci.getState(), is(ComponentInstance.VALID));
+
+    }
+
+    @Test
+    public void createACompositeWithAnImportedService() throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException {
+        // Define the component types
+        PrimitiveComponentType prov = createAProvider();
+        prov.createInstance();
+        PrimitiveComponentType cons = createAConsumer();
+
+        ServiceReference[] refs = osgiHelper.getServiceReferences(Factory.class.getName(),
+                "(component.providedServiceSpecifications=" + Foo.class.getName() + ")");
+        assertThat(refs.length, is(not(0)));
+
+        CompositeComponentType type = new CompositeComponentType()
+                .setBundleContext(context)
+                .setComponentTypeName("comp2")
+                .addSubService(new ImportedService().setSpecification(Foo.class.getName()))
+                .addInstance(new Instance(cons.getFactory().getName()));
+
+        ComponentInstance ci = type.createInstance();
+
+        System.out.println(ci.getInstanceDescription().getDescription());
+
+        assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));
+
+        // Stop prov
+        prov.stop();
+        assertThat("ci is invalid", ci.getState(), is(ComponentInstance.INVALID));
+
+        // Restart prov
+        prov.start();
+        prov.createInstance();
+        assertThat("ci is valid - 2", ci.getState(), is(ComponentInstance.VALID));
+
+    }
+
+    @Test
+    public void createACompositeWithAnOptionalImportedService() throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException {
+        // Define the component types
+        PrimitiveComponentType prov = createAProvider();
+        prov.createInstance();
+
+        CompositeComponentType type = new CompositeComponentType()
+                .setBundleContext(context)
+                .setComponentTypeName("comp3")
+                .addSubService(new ImportedService().setSpecification(Foo.class.getName()).setOptional(true));
+
+        ComponentInstance ci = type.createInstance();
+
+        assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));
+
+        // Stop prov
+        prov.stop();
+        assertThat("ci is valid - 1", ci.getState(), is(ComponentInstance.VALID));
+
+        // Restart prov
+        prov.start();
+        prov.createInstance();
+        assertThat("ci is valid - 2", ci.getState(), is(ComponentInstance.VALID));
+
+    }
+
+    @Test
+    public void createACompositeWithExportingAService() throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException {
+        // Define the component types
+        PrimitiveComponentType prov = createAProvider();
+        prov.start();
+        PrimitiveComponentType cons = createAConsumer();
+        ComponentInstance c = cons.createInstance();
+
+        CompositeComponentType type = new CompositeComponentType()
+                .setBundleContext(context)
+                .setComponentTypeName("compExport")
+                .addSubService(new InstantiatedService().setSpecification(Foo.class.getName()))
+                .addService(new ExportedService().setSpecification(Foo.class.getName()));
+
+        ComponentInstance ci = type.createInstance();
+
+        assertThat("ci is valid", ci.getState(), is(ComponentInstance.VALID));
+        assertThat("c is valid", c.getState(), is(ComponentInstance.VALID));
+
+
+        // Stop prov
+        prov.stop();
+        assertThat("ci is invalid", ci.getState(), is(ComponentInstance.INVALID));
+        assertThat("c is invalid", c.getState(), is(ComponentInstance.INVALID));
+
+
+        // Restart prov
+        prov.start();
+        assertThat("ci is valid - 2", ci.getState(), is(ComponentInstance.VALID));
+        assertThat("c is valid - 2", c.getState(), is(ComponentInstance.VALID));
+
+
+    }
+
+    private PrimitiveComponentType createAProvider() {
+        return new PrimitiveComponentType()
+                .setBundleContext(context)
+                .setClassName(FooImpl.class.getName())
+                .setPublic(true)
+                .addService(new Service()); // Provide the FooService
+    }
+
+    private PrimitiveComponentType createAConsumer() {
+        return new PrimitiveComponentType()
+                .setBundleContext(context)
+                .setClassName(MyComponentImpl.class.getName())
+                .addDependency(new Dependency().setField("myFoo"))
+                .setValidateMethod("start");
+    }
+
+
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/ExternalHandlerTest.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/ExternalHandlerTest.java
new file mode 100644
index 0000000..202a247
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/ExternalHandlerTest.java
@@ -0,0 +1,72 @@
+package org.apache.felix.ipojo.runtime.core.api;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.api.PrimitiveComponentType;
+import org.apache.felix.ipojo.architecture.HandlerDescription;
+import org.apache.felix.ipojo.runtime.core.api.components.HostImpl;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.BundleContext;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+
+
+public class ExternalHandlerTest extends Common {
+
+
+    private BundleContext context;
+
+    @Before
+    public void setUp() {
+        context = getContext();
+    }
+
+    @Test
+    public void createAHost() throws Exception {
+        PrimitiveComponentType type = createAWhiteboardHost();
+        ComponentInstance ci = type.createInstance();
+        assertThat(ci.getState(), is(ComponentInstance.VALID));
+        HandlerDescription hd = ci.getInstanceDescription().getHandlerDescription(Whiteboard.NAMESPACE + ":" + Whiteboard.NAME);
+        assertThat(hd, is(notNullValue()));
+    }
+
+    @Test
+    public void createDoubleHost() throws Exception {
+        PrimitiveComponentType type = createASecondWhiteboardHost();
+        ComponentInstance ci = type.createInstance();
+        assertThat(ci.getState(), is(ComponentInstance.VALID));
+        HandlerDescription hd = ci.getInstanceDescription().getHandlerDescription(Whiteboard.NAMESPACE + ":" + Whiteboard.NAME);
+        assertThat(hd, is(notNullValue()));
+    }
+
+    private PrimitiveComponentType createAWhiteboardHost() {
+        return new PrimitiveComponentType()
+                .setBundleContext(context)
+                .setClassName(HostImpl.class.getName())
+                .addHandler(new Whiteboard()
+                        .onArrival("arrival")
+                        .onDeparture("departure")
+                        .setFilter("(foo=foo)")
+                );
+    }
+
+    private PrimitiveComponentType createASecondWhiteboardHost() {
+        return new PrimitiveComponentType()
+                .setBundleContext(context)
+                .setClassName(HostImpl.class.getName())
+                .addHandler(new Whiteboard()
+                        .onArrival("arrival")
+                        .onDeparture("departure")
+                        .setFilter("(foo=foo)")
+                )
+                .addHandler(new Whiteboard()
+                        .onArrival("arrival")
+                        .onDeparture("departure")
+                        .setFilter("(foo=bar)")
+                        .onModification("modification")
+                );
+    }
+
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/PrimitiveComponentTest.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/PrimitiveComponentTest.java
new file mode 100644
index 0000000..a19606e
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/PrimitiveComponentTest.java
@@ -0,0 +1,143 @@
+package org.apache.felix.ipojo.runtime.core.api;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.ConfigurationException;
+import org.apache.felix.ipojo.MissingHandlerException;
+import org.apache.felix.ipojo.UnacceptableConfiguration;
+import org.apache.felix.ipojo.api.Dependency;
+import org.apache.felix.ipojo.api.PrimitiveComponentType;
+import org.apache.felix.ipojo.api.Service;
+import org.apache.felix.ipojo.api.SingletonComponentType;
+import org.apache.felix.ipojo.runtime.core.api.components.FooImpl;
+import org.apache.felix.ipojo.runtime.core.api.components.MyComponentImpl;
+import org.apache.felix.ipojo.runtime.core.api.services.Foo;
+import org.junit.Before;
+import org.junit.Test;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+import java.io.IOException;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+
+public class PrimitiveComponentTest extends Common {
+
+    private BundleContext context;
+
+    @Before
+    public void setUp() {
+        context = getContext();
+    }
+
+    @Configuration
+    public Option[] config() throws IOException {
+        return super.config();
+    }
+
+    @Test
+    public void createAServiceProvider() throws Exception {
+        assertThat(context, is(notNullValue()));
+        ComponentInstance ci;
+
+        PrimitiveComponentType type = createAProvider();
+        ci = type.createInstance();
+        assertThat("Ci is valid", ci.getState(), is(ComponentInstance.VALID));
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(Foo.class
+                .getName(), ci.getInstanceName());
+        assertThat(ref, is(notNullValue()));
+
+    }
+
+    @Test
+    public void killTheFactory() throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException {
+        assertThat(context, is(notNullValue()));
+        ComponentInstance ci = null;
+
+        PrimitiveComponentType type = createAProvider();
+        ci = type.createInstance();
+        assertThat("Ci is valid", ci.getState(), is(ComponentInstance.VALID));
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(Foo.class
+                .getName(), ci.getInstanceName());
+        assertThat(ref, is(notNullValue()));
+        type.stop();
+        assertThat("Ci is disposed", ci.getState(),
+                is(ComponentInstance.DISPOSED));
+        ref = ipojoHelper.getServiceReferenceByName(Foo.class.getName(), ci
+                .getInstanceName());
+        assertThat(ref, is(nullValue()));
+
+    }
+
+    @Test
+    public void createAServiceCons() throws Exception {
+        assertThat(context, is(notNullValue()));
+        ComponentInstance ci = null;
+
+        PrimitiveComponentType type = createAConsumer();
+        ci = type.createInstance();
+        assertThat("Ci is invalid", ci.getState(),
+                is(ComponentInstance.INVALID));
+
+    }
+
+    @Test
+    public void createBoth() throws Exception {
+        ComponentInstance cons = createAConsumer().createInstance();
+        // cons is invalid
+        assertThat("cons is invalid", cons.getState(), is(ComponentInstance.INVALID));
+
+        ComponentInstance prov = createAProvider().createInstance();
+        assertThat("prov is valid", prov.getState(), is(ComponentInstance.VALID));
+        assertThat("cons is valid", cons.getState(), is(ComponentInstance.VALID));
+
+    }
+
+    @Test
+    public void createTwoCons() throws Exception {
+        ComponentInstance cons1 = createAConsumer().createInstance();
+        // cons is invalid
+        assertThat("cons is invalid", cons1.getState(), is(ComponentInstance.INVALID));
+
+        ComponentInstance prov = createAProvider().createInstance();
+        assertThat("prov is valid", prov.getState(), is(ComponentInstance.VALID));
+        assertThat("cons is valid", cons1.getState(), is(ComponentInstance.VALID));
+
+        ComponentInstance cons2 = createAnOptionalConsumer().createInstance();
+
+        assertThat("cons2 is valid", cons2.getState(), is(ComponentInstance.VALID));
+
+        prov.stop();
+        assertThat("cons is invalid", cons1.getState(), is(ComponentInstance.INVALID));
+        assertThat("cons2 is valid", cons2.getState(), is(ComponentInstance.VALID));
+    }
+
+    private PrimitiveComponentType createAProvider() {
+        return new PrimitiveComponentType()
+                .setBundleContext(context)
+                .setClassName(FooImpl.class.getName())
+                .addService(new Service()); // Provide the FooService
+    }
+
+    private PrimitiveComponentType createAConsumer() {
+        return new SingletonComponentType()
+                .setBundleContext(context)
+                .setClassName(MyComponentImpl.class.getName())
+                .addDependency(new Dependency().setField("myFoo"))
+                .setValidateMethod("start");
+    }
+
+    private PrimitiveComponentType createAnOptionalConsumer() {
+        return new SingletonComponentType()
+                .setBundleContext(context)
+                .setComponentTypeName("cons.optional")
+                .setClassName(MyComponentImpl.class.getName())
+                .addDependency(new Dependency().setField("myFoo").setOptional(true))
+                .setValidateMethod("start");
+    }
+
+
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/SingletonComponentTest.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/SingletonComponentTest.java
new file mode 100644
index 0000000..8d7f74b
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/SingletonComponentTest.java
@@ -0,0 +1,159 @@
+package org.apache.felix.ipojo.runtime.core.api;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.ConfigurationException;
+import org.apache.felix.ipojo.MissingHandlerException;
+import org.apache.felix.ipojo.UnacceptableConfiguration;
+import org.apache.felix.ipojo.api.Dependency;
+import org.apache.felix.ipojo.api.PrimitiveComponentType;
+import org.apache.felix.ipojo.api.Service;
+import org.apache.felix.ipojo.api.SingletonComponentType;
+import org.apache.felix.ipojo.runtime.core.api.components.FooImpl;
+import org.apache.felix.ipojo.runtime.core.api.components.MyComponentImpl;
+import org.apache.felix.ipojo.runtime.core.api.services.Foo;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+
+public class SingletonComponentTest extends Common {
+
+    private BundleContext context;
+
+    @Before
+    public void setUp() {
+        context = getContext();
+    }
+
+    @Test
+    public void createAServiceProvider() throws UnacceptableConfiguration, MissingHandlerException, ConfigurationException {
+        assertThat(context, is(notNullValue()));
+        ComponentInstance ci = null;
+
+        SingletonComponentType type = createAProvider();
+        ci = type.create();
+        assertThat("Ci is valid", ci.getState(), is(ComponentInstance.VALID));
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(Foo.class
+                .getName(), ci.getInstanceName());
+        assertThat(ref, is(notNullValue()));
+        type.disposeInstance(ci);
+
+    }
+
+    @Test
+    public void killTheFactory() throws Exception {
+        assertThat(context, is(notNullValue()));
+        ComponentInstance ci = null;
+        SingletonComponentType type = createAProvider();
+        ci = type.create();
+        assertThat("Ci is valid", ci.getState(), is(ComponentInstance.VALID));
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(Foo.class
+                .getName(), ci.getInstanceName());
+        assertThat(ref, is(notNullValue()));
+        type.stop();
+        assertThat("Ci is disposed", ci.getState(),
+                is(ComponentInstance.DISPOSED));
+        ref = ipojoHelper.getServiceReferenceByName(Foo.class.getName(), ci
+                .getInstanceName());
+        assertThat(ref, is(nullValue()));
+    }
+
+    @Test
+    public void createAServiceCons() throws Exception {
+        assertThat(context, is(notNullValue()));
+        ComponentInstance ci = null;
+
+        SingletonComponentType type = createAConsumer();
+        ci = type.create();
+        assertThat("Ci is invalid", ci.getState(),
+                is(ComponentInstance.INVALID));
+        type.stop();
+    }
+
+    @Test
+    public void createBoth() throws Exception {
+        SingletonComponentType consFactory = createAConsumer();
+        ComponentInstance cons = consFactory.create();
+        // cons is invalid
+        assertThat("cons is invalid", cons.getState(), is(ComponentInstance.INVALID));
+
+        SingletonComponentType provFactory = createAProvider();
+        ComponentInstance prov = provFactory.create();
+        assertThat("prov is valid", prov.getState(), is(ComponentInstance.VALID));
+        assertThat("cons is valid", cons.getState(), is(ComponentInstance.VALID));
+        consFactory.stop();
+        provFactory.stop();
+    }
+
+    @Test
+    public void createTwoCons() throws Exception {
+        SingletonComponentType consFactory = createAConsumer();
+        ComponentInstance cons1 = createAConsumer().create();
+        // cons is invalid
+        assertThat("cons is invalid", cons1.getState(), is(ComponentInstance.INVALID));
+
+        ComponentInstance prov = createAProvider().create();
+        assertThat("prov is valid", prov.getState(), is(ComponentInstance.VALID));
+        assertThat("cons is valid", cons1.getState(), is(ComponentInstance.VALID));
+
+        ComponentInstance cons2 = createAnOptionalConsumer().create();
+
+        assertThat("cons2 is valid", cons2.getState(), is(ComponentInstance.VALID));
+
+        prov.stop();
+        assertThat("cons is invalid", cons1.getState(), is(ComponentInstance.INVALID));
+        assertThat("cons2 is valid", cons2.getState(), is(ComponentInstance.VALID));
+    }
+
+    @Test
+   // @Ignore("We can't test as the MyComponentImpl must be manipulated before creating the object")
+    public void setObject() throws Exception {
+        ComponentInstance cons = createAConsumer().setObject(new MyComponentImpl(5)).create();
+        // cons is invalid
+        assertThat("cons is invalid", cons.getState(), is(ComponentInstance.INVALID));
+
+        ComponentInstance prov = createAProvider().create();
+        assertThat("prov is valid", prov.getState(), is(ComponentInstance.VALID));
+        assertThat("cons is valid", cons.getState(), is(ComponentInstance.VALID));
+
+    }
+
+    private SingletonComponentType createAProvider() {
+        PrimitiveComponentType type = new SingletonComponentType()
+                .setBundleContext(context)
+                .setClassName(FooImpl.class.getName())
+                .addService(new Service()); // Provide the FooService
+
+        return (SingletonComponentType) type;
+    }
+
+    private SingletonComponentType createAConsumer() {
+        PrimitiveComponentType type = new SingletonComponentType()
+                .setBundleContext(context)
+                .setClassName(MyComponentImpl.class.getName())
+                .setComponentTypeName("singleton.cons")
+                .addDependency(new Dependency().setField("myFoo"))
+                .setValidateMethod("start");
+
+        return (SingletonComponentType) type;
+    }
+
+    private SingletonComponentType createAnOptionalConsumer() {
+        PrimitiveComponentType type = new SingletonComponentType()
+                .setBundleContext(context)
+                .setClassName(MyComponentImpl.class.getName())
+                .addDependency(new Dependency().setField("myFoo").setOptional(true))
+                .setComponentTypeName("singleton.optional.consumer")
+                .setValidateMethod("start");
+
+        return (SingletonComponentType) type;
+
+    }
+
+
+}
diff --git a/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/Whiteboard.java b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/Whiteboard.java
new file mode 100644
index 0000000..de3e305
--- /dev/null
+++ b/ipojo/runtime/api-it/src/it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/Whiteboard.java
@@ -0,0 +1,71 @@
+package org.apache.felix.ipojo.runtime.core.api;
+
+import org.apache.felix.ipojo.api.HandlerConfiguration;
+import org.apache.felix.ipojo.metadata.Attribute;
+import org.apache.felix.ipojo.metadata.Element;
+
+public class Whiteboard implements HandlerConfiguration {
+    
+    public static final String NAME = "wbp";
+    
+    public static final String NAMESPACE = "org.apache.felix.ipojo.whiteboard";
+    
+    private String arrival;
+    
+    private String departure;
+    
+    private String modification;
+    
+    private String filter;
+    
+    public Whiteboard onArrival(String method) {
+        arrival = method;
+        return this;
+    }
+    
+    public Whiteboard onDeparture(String method) {
+        departure = method;
+        return this;
+    }
+    
+    public Whiteboard onModification(String method) {
+        modification = method;
+        return this;
+    }
+    
+    public Whiteboard setFilter(String fil) {
+        filter = fil;
+        return this;
+    }
+
+    public Element getElement() {
+        ensureValidity();
+        // Create the root element.
+        Element element = new Element(NAME, NAMESPACE);
+        // Mandatory attributes
+        element.addAttribute(new Attribute("onArrival", arrival));
+        element.addAttribute(new Attribute("onDeparture", departure));
+        element.addAttribute(new Attribute("filter", filter));
+        
+        // Optional attribute
+        if (modification != null) {
+            element.addAttribute(new Attribute("onModification", modification));
+        }        
+        
+        return element;
+    }
+
+    private void ensureValidity() {
+        if (arrival == null) {
+            throw new IllegalStateException("The whiteboard pattern configuration must have a onArrival method");
+        }
+        if (departure == null) {
+            throw new IllegalStateException("The whiteboard pattern configuration must have a onDeparture method");
+        }
+        if (filter == null) {
+            throw new IllegalStateException("The whiteboard pattern configuration must have a filter");
+        }
+        
+    }
+
+}
