diff --git a/ipojo/manipulator/manipulator-it/pom.xml b/ipojo/manipulator/manipulator-it/pom.xml
new file mode 100644
index 0000000..5876650
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/pom.xml
@@ -0,0 +1,441 @@
+<!--
+  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.manipulator.manipulator-it</artifactId>
+    <version>1.9.0-SNAPSHOT</version>
+    <name>Apache Felix iPOJO Runtime Project ~ Manipulator 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.0.0</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>
+
+        <!-- Define the tested version -->
+        <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.manipulator</artifactId>
+            <version>1.9.0-SNAPSHOT</version>
+        </dependency>
+        <!-- End of tested version -->
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <version>1.6.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.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/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/pom.xml b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/pom.xml
new file mode 100644
index 0000000..6a16af6
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-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.manipulator.manipulator-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-manipulator-creation-test</artifactId>
+
+    <name>${project.artifactId}</name>
+    
+</project>
\ No newline at end of file
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ASimpleParentClass.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ASimpleParentClass.java
new file mode 100644
index 0000000..27b558b
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ASimpleParentClass.java
@@ -0,0 +1,11 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+public class ASimpleParentClass {
+    
+    protected String name;
+    
+    public ASimpleParentClass() {
+        name = "hello";
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperConstructor.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperConstructor.java
new file mode 100644
index 0000000..733a076
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperConstructor.java
@@ -0,0 +1,10 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+public class CallSuperConstructor extends ParentClass {
+    
+    public CallSuperConstructor() {
+        super("test");
+        System.out.println("plop");
+    } 
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperConstructorWithBC.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperConstructorWithBC.java
new file mode 100644
index 0000000..06d0caa
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperConstructorWithBC.java
@@ -0,0 +1,13 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import org.osgi.framework.BundleContext;
+
+public class CallSuperConstructorWithBC extends ParentClassWithBC {
+    
+    public CallSuperConstructorWithBC(BundleContext bc) {
+        super("bc", bc, "bundle");
+        String message = "plop-bc";
+        System.out.println(message);
+    } 
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperConstructorWithNew.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperConstructorWithNew.java
new file mode 100644
index 0000000..9b2ed76
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperConstructorWithNew.java
@@ -0,0 +1,10 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+public class CallSuperConstructorWithNew extends ParentClass {
+    
+    public CallSuperConstructorWithNew() {
+        super(new StringBuffer("test"));
+        System.out.println("plop");
+    } 
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperSuperConstructorWithNew.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperSuperConstructorWithNew.java
new file mode 100644
index 0000000..e556b21
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/CallSuperSuperConstructorWithNew.java
@@ -0,0 +1,10 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+public class CallSuperSuperConstructorWithNew extends ParentClass2 {
+
+    public CallSuperSuperConstructorWithNew() {
+        super(new String("test"));
+        System.out.println("plop");
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderType1.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderType1.java
new file mode 100644
index 0000000..4d6add7
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderType1.java
@@ -0,0 +1,117 @@
+/* 
+ * 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.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+import org.osgi.framework.BundleContext;
+
+import java.util.Properties;
+
+public class FooProviderType1 implements FooService {
+	
+	private int m_bar;
+	private String m_foo;
+    
+    private BundleContext m_context;
+    
+    private static FooProviderType1 singleton;
+    private static int count = 0;
+    
+    private static FooProviderType1 singleton(BundleContext bc) {
+        if (singleton == null) {
+            count++;
+            singleton = new FooProviderType1(bc);
+        }
+        return singleton;
+    }
+    
+    public static FooProviderType1 several(BundleContext bc) {
+        count++;
+        return new FooProviderType1(bc);
+    }
+        
+    public FooProviderType1(BundleContext bc) {
+        if (bc ==null) {
+            throw new RuntimeException("Injected bundle context null");
+        }
+        m_context = bc;
+    }
+
+	public boolean foo() {
+		return true;
+	}
+
+	public Properties fooProps() {
+		Properties p = new Properties();
+		p.put("bar", new Integer(m_bar));
+        if(m_foo != null) {
+            p.put("foo", m_foo);
+        }
+        p.put("context", m_context);
+        
+        p.put("count", new Integer(count));
+		return p;
+	}
+    
+	public void testException() throws Exception {
+        String a = "foobarbaz";
+	    throw new Exception("foo"+a);
+    }
+    
+    public void testTry() {
+            String a = "foo";
+            a.charAt(0);
+    }
+    
+    public void testTry2(String s) {
+            String a = "foo";
+            a.charAt(0);
+    }
+    
+    private void nexttry(String  s) {
+        try {
+            s += "foo";
+        } catch(RuntimeException e) {
+            
+        }
+    }
+    
+	public boolean getBoolean() { return true; }
+
+	public double getDouble() { return 1.0; }
+
+	public int getInt() { return 1; }
+
+	public long getLong() { return 1; }
+
+	public Boolean getObject() { return new Boolean(true); }
+	
+	/**
+	 * Custom constructor.
+	 * @param bar
+	 * @param foo
+	 * @param bc
+	 */
+	public FooProviderType1(int bar, String foo, BundleContext bc) {
+	    m_bar = bar;
+	    m_foo = foo;
+	    m_context = bc;
+	}
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/NoEmptyConstructor.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/NoEmptyConstructor.java
new file mode 100644
index 0000000..4b57e25
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/NoEmptyConstructor.java
@@ -0,0 +1,31 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.CheckService;
+
+import java.util.Properties;
+
+public class NoEmptyConstructor implements CheckService {
+    
+   
+        private String name;
+
+        public NoEmptyConstructor(final String n) {
+            name = n;
+        }
+
+        public boolean check() {
+            return name != null;
+        }
+
+        public Properties getProps() {
+            Properties props = new Properties();
+            if (name == null) {
+                props.put("name", "NULL");
+            } else {
+                props.put("name", name);
+            }
+            return props;
+        }
+
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/NoEmptyConstructorWithParentClass.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/NoEmptyConstructorWithParentClass.java
new file mode 100644
index 0000000..079cc44
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/NoEmptyConstructorWithParentClass.java
@@ -0,0 +1,27 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.CheckService;
+
+import java.util.Properties;
+
+public class NoEmptyConstructorWithParentClass extends ASimpleParentClass implements CheckService  {
+    
+        public NoEmptyConstructorWithParentClass(final String n) {
+            name = n;
+        }
+
+        public boolean check() {
+            return name != null;
+        }
+
+        public Properties getProps() {
+            Properties props = new Properties();
+            if (name == null) {
+                props.put("name", "NULL");
+            } else {
+                props.put("name", name);
+            }
+            return props;
+        }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ParentClass.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ParentClass.java
new file mode 100644
index 0000000..b9de05f
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ParentClass.java
@@ -0,0 +1,15 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+public class ParentClass {
+    
+    private String name;
+
+    public ParentClass(final String n) {
+        name = n;
+    }
+    
+    public ParentClass(final StringBuffer n) {
+        name = n.toString();
+    } 
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ParentClass2.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ParentClass2.java
new file mode 100644
index 0000000..76112f8
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ParentClass2.java
@@ -0,0 +1,9 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+public class ParentClass2 extends SuperParentClass {
+
+    public ParentClass2(String n) {
+        super(n);
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ParentClassWithBC.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ParentClassWithBC.java
new file mode 100644
index 0000000..725b32d
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/ParentClassWithBC.java
@@ -0,0 +1,14 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import org.osgi.framework.BundleContext;
+
+public class ParentClassWithBC {
+    
+    private BundleContext bc;
+
+    public ParentClassWithBC(String foo, BundleContext bc, String bar) {
+        this.bc = bc;
+        System.out.println(foo + " : " + this.bc + "(" + bar + ")");
+    } 
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/SeveralConstructors.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/SeveralConstructors.java
new file mode 100644
index 0000000..8f78c82
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/SeveralConstructors.java
@@ -0,0 +1,31 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.CheckService;
+
+import java.util.Properties;
+
+public class SeveralConstructors implements CheckService {
+    
+   
+        private String name;
+
+        public SeveralConstructors(){
+            this("hello world");
+        }
+
+        public SeveralConstructors(final String n) {
+            name = n;
+        }
+
+        public boolean check() {
+            return name != null;
+        }
+
+        public Properties getProps() {
+            Properties props = new Properties();
+            props.put("name", name);
+            return props;
+        }
+
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/SuperParentClass.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/SuperParentClass.java
new file mode 100644
index 0000000..c8cccfe
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/SuperParentClass.java
@@ -0,0 +1,17 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+public class SuperParentClass {
+
+    private String name;
+
+    public SuperParentClass(final String n) {
+        System.out.println("Hello from super super !");
+        name = n;
+    }
+
+    public SuperParentClass(final StringBuffer n) {
+        name = n.toString();
+    }
+
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/A123/CheckService2.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/A123/CheckService2.java
new file mode 100644
index 0000000..e31a24a
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/A123/CheckService2.java
@@ -0,0 +1,25 @@
+/* 
+ * 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.runtime.core.services.A123;
+
+public interface CheckService2 {
+	
+	public boolean check();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BarService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BarService.java
new file mode 100644
index 0000000..f704138
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BarService.java
@@ -0,0 +1,29 @@
+/* 
+ * 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.runtime.core.services;
+
+import java.util.Properties;
+
+public interface BarService {
+	
+	public boolean bar();
+	
+	public Properties getProps();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/CheckService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/CheckService.java
new file mode 100644
index 0000000..eca0faa
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/CheckService.java
@@ -0,0 +1,31 @@
+/* 
+ * 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.runtime.core.services;
+
+import java.util.Properties;
+
+public interface CheckService {
+    
+    public static final String foo = "foo";
+	
+	public boolean check();
+	
+	public Properties getProps();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java
new file mode 100644
index 0000000..37c1a65
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java
@@ -0,0 +1,39 @@
+/* 
+ * 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.runtime.core.services;
+
+import java.util.Properties;
+
+public interface FooService {
+
+	boolean foo();
+	
+	Properties fooProps();
+	
+	Boolean getObject();
+	
+	boolean getBoolean();
+	
+	int getInt();
+	
+	long getLong();
+	
+	double getDouble();
+	
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/Plop.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/Plop.java
new file mode 100644
index 0000000..bbe8a7e
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/Plop.java
@@ -0,0 +1,7 @@
+package org.apache.felix.ipojo.runtime.core.services;
+
+public interface Plop {
+    
+   Object getPlop();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/PrimitiveManipulationTestService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/PrimitiveManipulationTestService.java
new file mode 100644
index 0000000..10a6288
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/PrimitiveManipulationTestService.java
@@ -0,0 +1,75 @@
+/* 
+ * 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.runtime.core.services;
+
+public interface PrimitiveManipulationTestService {
+	
+	byte getByte();
+	void setByte(byte b);
+	
+	short getShort();
+	void setShort(short s);
+	
+	int getInt();
+	void setInt(int i);
+	
+	long getLong();
+	void setLong(long l);
+	
+	float getFloat();
+	void setFloat(float f);
+	
+	double getDouble();
+	void setDouble(double d);
+	
+	char getChar();
+	void setChar(char c);
+	
+	boolean getBoolean();
+	void setBoolean(boolean b);
+	
+	// Array types
+	byte[] getBytes();
+	void setBytes(byte[] bs);
+	
+	short[] getShorts();
+	void setShorts(short[] ss);
+	
+	int[] getInts();
+	void setInts(int is[]);
+	
+	long[] getLongs();
+	void setLongs(long[] ls);
+	
+	float[] getFloats();
+	void setFloats(float[] fs);
+	
+	double[] getDoubles();
+	void setDoubles(double[] ds);
+	
+	char[] getChars();
+	void setChars(char[] cs);
+	
+	boolean[] getBooleans();
+	void setBooleans(boolean[] bs);	
+	
+	// This method has been added to test an issue when autoboxing.
+	void setLong(long l, String s);
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/resources/metadata.xml b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/resources/metadata.xml
new file mode 100644
index 0000000..b3be98e
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/main/resources/metadata.xml
@@ -0,0 +1,76 @@
+<ipojo
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/SNAPSHOT/core.xsd"
+        xmlns="org.apache.felix.ipojo"
+        >
+    <!-- Simple provider  used for manipulation analysis -->
+    <component
+            classname="org.apache.felix.ipojo.runtime.core.components.FooProviderType1"
+            name="ManipulationCreation-FooProviderType-1" architecture="true">
+        <provides/>
+    </component>
+
+    <!-- Non lazzy service provider, to check instantiation -->
+    <component
+            classname="org.apache.felix.ipojo.runtime.core.components.FooProviderType1"
+            name="ManipulationCreation-ImmediateFooProviderType" immediate="true"
+            architecture="true">
+        <provides/>
+    </component>
+
+    <!-- Type checking different creation policy -->
+    <component
+            classname="org.apache.felix.ipojo.runtime.core.components.FooProviderType1"
+            name="ManipulationCreation-FooProviderType-1-Sing" factory-method="singleton"
+            architecture="true">
+        <provides/>
+    </component>
+
+    <component
+            classname="org.apache.felix.ipojo.runtime.core.components.FooProviderType1"
+            name="ManipulationCreation-FooProviderType-1-Sev" factory-method="several"
+            architecture="true">
+        <provides/>
+    </component>
+
+    <component
+            classname="org.apache.felix.ipojo.runtime.core.components.FooProviderType1"
+            name="ManipulationCreation-FooProviderType-1-SingM" factory-method="singleton"
+            architecture="true">
+        <provides/>
+    </component>
+
+    <component
+            classname="org.apache.felix.ipojo.runtime.core.components.FooProviderType1"
+            name="ManipulationCreation-FooProviderType-1-SevM" factory-method="several"
+            architecture="true">
+        <provides/>
+    </component>
+
+    <component
+            classname="org.apache.felix.ipojo.runtime.core.components.FooProviderType1"
+            name="ManipulationCreation-ImmediateFooProviderTypeSingleton" immediate="true"
+            factory-method="singleton" architecture="true">
+        <provides/>
+    </component>
+
+
+    <!-- Try calling super constructors -->
+    <component classname="org.apache.felix.ipojo.runtime.core.components.CallSuperConstructor" immediate="true"/>
+    <component classname="org.apache.felix.ipojo.runtime.core.components.CallSuperConstructorWithNew" immediate="true"/>
+    <component classname="org.apache.felix.ipojo.runtime.core.components.CallSuperConstructorWithBC" immediate="true"/>
+    <component classname="org.apache.felix.ipojo.runtime.core.components.CallSuperSuperConstructorWithNew"
+               immediate="true"/>
+
+    <!--  Several constructors -->
+    <component classname="org.apache.felix.ipojo.runtime.core.components.SeveralConstructors">
+        <provides/>
+    </component>
+    <!--  No Empty constructor -->
+    <component classname="org.apache.felix.ipojo.runtime.core.components.NoEmptyConstructor">
+        <provides/>
+    </component>
+    <component classname="org.apache.felix.ipojo.runtime.core.components.NoEmptyConstructorWithParentClass">
+        <provides/>
+    </component>
+</ipojo>
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java
new file mode 100644
index 0000000..509721c
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java
@@ -0,0 +1,198 @@
+package org.apache.felix.ipojo.runtime.core;
+
+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.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.PerClass;
+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.BundleContext;
+import org.osgi.framework.Constants;
+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
+    BundleContext bc;
+
+    OSGiHelper osgiHelper;
+    IPOJOHelper ipojoHelper;
+
+    @Configuration
+    public Option[] config() throws IOException {
+        Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
+        root.setLevel(Level.INFO);
+
+        return options(
+                ipojoBundles(),
+                junitBundles(),
+                testedBundle(),
+                systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("WARN")
+        );
+    }
+
+    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")
+        );
+    }
+
+
+    @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);
+    }
+
+    @After
+    public void commonTearDown() {
+        ipojoHelper.dispose();
+        osgiHelper.dispose();
+    }
+
+    public CompositeOption ipojoBundles() {
+        return new DefaultCompositeOption(
+                mavenBundle("org.apache.felix", "org.apache.felix.ipojo").versionAsInProject(),
+                mavenBundle("org.ow2.chameleon.testing", "osgi-helpers").versionAsInProject(),
+                // harmcrest-all
+                //mavenBundle("de.twentyeleven.skysail", "org.hamcrest.hamcrest-all-osgi").versionAsInProject(),
+                // configuration admin
+                mavenBundle("org.apache.felix",  "org.apache.felix.configadmin").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.getAbsolutePath().contains("/services")  || file.getAbsolutePath().contains("/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);
+            }
+        }
+
+        // We export components.
+        String export = "org.apache.felix.ipojo.runtime.core.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);
+    }
+
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPOJOCreation.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPOJOCreation.java
new file mode 100644
index 0000000..c4ce866
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPOJOCreation.java
@@ -0,0 +1,274 @@
+/*
+ * 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.runtime.core;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.PrimitiveInstanceDescription;
+import org.apache.felix.ipojo.architecture.Architecture;
+import org.apache.felix.ipojo.runtime.core.components.FooProviderType1;
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.ServiceReference;
+
+import java.util.Properties;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.*;
+
+/**
+ * Check the different method to create POJO object.
+ */
+public class TestPOJOCreation extends Common {
+
+    private ComponentInstance ci_lazzy;
+    private ComponentInstance ci_immediate;
+    private ComponentInstance ci_immediate_singleton;
+
+    private Architecture lazzyArch;
+    private Architecture immeArch;
+    private Architecture immeArchSing;
+
+
+    private ComponentInstance ci_lazzy_sing;
+    private ComponentInstance ci_lazzy_sev;
+
+    private Architecture lazzyArchSing;
+    private Architecture lazzyArchSev;
+    private ComponentInstance ci_lazzy_singM;
+    private ComponentInstance ci_lazzy_sevM;
+
+    private Architecture lazzyArchSingM;
+    private Architecture lazzyArchSevM;
+
+    @Before
+    public void setUp() {
+        String factName = "ManipulationCreation-FooProviderType-1";
+        String compName = "FooProvider-1";
+        ci_lazzy = ipojoHelper.createComponentInstance(factName, compName);
+
+        String factName2 = "ManipulationCreation-ImmediateFooProviderType";
+        String compName2 = "FooProvider-2";
+        ci_immediate = ipojoHelper.createComponentInstance(factName2, compName2);
+
+        String factName3 = "ManipulationCreation-ImmediateFooProviderTypeSingleton";
+        String compName3 = "FooProvider-3";
+        ci_immediate_singleton = ipojoHelper.createComponentInstance(factName3, compName3);
+
+        String factName4 = "ManipulationCreation-FooProviderType-1-Sing";
+        String compName4 = "FooProvider-1-Sing";
+        ci_lazzy_sing = ipojoHelper.createComponentInstance(factName4, compName4);
+
+        String factName5 = "ManipulationCreation-FooProviderType-1-Sev";
+        String compName5 = "FooProvider-1-Sev";
+        ci_lazzy_sev = ipojoHelper.createComponentInstance(factName5, compName5);
+
+        String factName6 = "ManipulationCreation-FooProviderType-1-SingM";
+        String compName6 = "FooProvider-1-SingM";
+        ci_lazzy_singM = ipojoHelper.createComponentInstance(factName6, compName6);
+
+        String factName7 = "ManipulationCreation-FooProviderType-1-SevM";
+        String compName7 = "FooProvider-1-SevM";
+        ci_lazzy_sevM = ipojoHelper.createComponentInstance(factName7, compName7);
+
+        lazzyArch = (Architecture) osgiHelper.getServiceObject(Architecture.class.getName(), "(architecture.instance=" + compName + ")");
+        immeArch = (Architecture) osgiHelper.getServiceObject(Architecture.class.getName(), "(architecture.instance=" + compName2 + ")");
+        immeArchSing = (Architecture) osgiHelper.getServiceObject(Architecture.class.getName(), "(architecture.instance=" + compName3 + ")");
+        lazzyArchSing = (Architecture) osgiHelper.getServiceObject(Architecture.class.getName(), "(architecture.instance=" + compName4 + ")");
+        lazzyArchSev = (Architecture) osgiHelper.getServiceObject(Architecture.class.getName(), "(architecture.instance=" + compName5 + ")");
+        lazzyArchSingM = (Architecture) osgiHelper.getServiceObject(Architecture.class.getName(), "(architecture.instance=" + compName6 + ")");
+        lazzyArchSevM = (Architecture) osgiHelper.getServiceObject(Architecture.class.getName(), "(architecture.instance=" + compName7 + ")");
+    }
+
+    public void tearDown() {
+        lazzyArch = null;
+        immeArch = null;
+        immeArchSing = null;
+        lazzyArchSing = null;
+        lazzyArchSev = null;
+        lazzyArchSingM = null;
+        lazzyArchSevM = null;
+        ipojoHelper.dispose();
+    }
+
+    /**
+     * Check lazy creation.
+     */
+    @Test
+    public void testLazyCreation() {
+        assertEquals("Check that no objects are created ", 0, ((PrimitiveInstanceDescription) lazzyArch.getInstanceDescription()).getCreatedObjects().length);
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_lazzy.getInstanceName());
+        assertNotNull("Check that a FooService from " + ci_lazzy.getInstanceName() + " is available", ref);
+        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        assertTrue("Check the FooService invocation", fs.foo());
+        assertEquals("Check the creation of 1 object", 1, ((PrimitiveInstanceDescription) lazzyArch.getInstanceDescription()).getCreatedObjects().length);
+    }
+
+    /**
+     * Check lazy and singleton creation.
+     */
+    @Test
+    public void testLazyCreationSingleton() {
+        assertEquals("Check that no objects are created ", 0, ((PrimitiveInstanceDescription) lazzyArchSing.getInstanceDescription()).getCreatedObjects().length);
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_lazzy_sing.getInstanceName());
+        assertNotNull("Check that a FooService from " + ci_lazzy_sing.getInstanceName() + " is available", ref);
+        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        assertTrue("Check the FooService invocation", fs.foo());
+        assertEquals("Check the creation of 1 object", 1, ((PrimitiveInstanceDescription) lazzyArchSing.getInstanceDescription()).getCreatedObjects().length);
+    }
+
+    /**
+     * Check lazy and "several" creation.
+     */
+    @Test
+    public void testLazyCreationSeveral() {
+        assertEquals("Check that no objects are created ", 0, ((PrimitiveInstanceDescription) lazzyArchSev.getInstanceDescription()).getCreatedObjects().length);
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_lazzy_sev.getInstanceName());
+        assertNotNull("Check that a FooService from " + ci_lazzy_sev.getInstanceName() + " is available", ref);
+        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs2 = (FooService) osgiHelper.getServiceObject(ref);
+        assertTrue("Check the FooService invocation", fs.foo());
+        assertTrue("Check the FooService invocation-2", fs2.foo());
+        assertEquals("Check the creation of 1 object", 1, ((PrimitiveInstanceDescription) lazzyArchSev.getInstanceDescription()).getCreatedObjects().length);
+    }
+
+    /**
+     * Check immediate creation.
+     */
+    @Test
+    public void testImmediateCreation() {
+        assertEquals("Check that one object is created ", 1, ((PrimitiveInstanceDescription) immeArch.getInstanceDescription()).getCreatedObjects().length);
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_immediate.getInstanceName());
+        assertNotNull("Check that a FooService from " + ci_immediate.getInstanceName() + " is available", ref);
+        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        assertTrue("Check the FooService invocation", fs.foo());
+        assertEquals("Check the creation of 1 object", 1, ((PrimitiveInstanceDescription) immeArch.getInstanceDescription()).getCreatedObjects().length);
+    }
+
+    /**
+     * Check bundle context injection.
+     */
+    @Test
+    public void testBundleContext() {
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_lazzy.getInstanceName());
+        assertNotNull("Check that a FooService from " + ci_lazzy.getInstanceName() + " is available", ref);
+        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        Properties p = fs.fooProps();
+        assertNotNull("Check the bundle context", p.get("context"));
+        assertEquals("Check the creation of 1 object", 1, ((PrimitiveInstanceDescription) lazzyArch.getInstanceDescription()).getCreatedObjects().length);
+    }
+
+    /**
+     * Test immediate singleton creation.
+     */
+    @Test
+    public void testImmediateSingletonCreation() {
+        assertEquals("Check that one object is created ", 1, ((PrimitiveInstanceDescription) immeArchSing.getInstanceDescription()).getCreatedObjects().length);
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_immediate_singleton.getInstanceName());
+        assertNotNull("Check that a FooService from " + ci_immediate_singleton.getInstanceName() + " is available", ref);
+        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        assertTrue("Check the FooService invocation", fs.foo());
+        assertEquals("Check the creation of 1 object", 1, ((PrimitiveInstanceDescription) immeArchSing.getInstanceDescription()).getCreatedObjects().length);
+    }
+
+    /**
+     * Check creation through a factory method.
+     * (lazy & singleton creation)
+     */
+    @Test
+    public void testLazyCreationSingletonM() {
+        assertEquals("Check that no objects are created ", 0, ((PrimitiveInstanceDescription) lazzyArchSingM.getInstanceDescription()).getCreatedObjects().length);
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_lazzy_singM.getInstanceName());
+        assertNotNull("Check that a FooService from " + ci_lazzy_singM.getInstanceName() + " is available", ref);
+        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs2 = (FooService) osgiHelper.getServiceObject(ref);
+        assertTrue("Check the FooService invocation", fs.foo());
+        assertTrue("Check the FooService invocation", fs2.foo());
+        assertEquals("Check the creation of 1 object", 1, ((PrimitiveInstanceDescription) lazzyArchSingM.getInstanceDescription()).getCreatedObjects().length);
+    }
+
+    /**
+     * Check creation through a factory method.
+     * (lazy & several creation)
+     */
+    @Test
+    public void testLazyCreationSeveralM() {
+        assertEquals("Check that no objects are created ", 0, ((PrimitiveInstanceDescription) lazzyArchSevM.getInstanceDescription()).getCreatedObjects().length);
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_lazzy_sevM.getInstanceName());
+        assertNotNull("Check that a FooService from " + ci_lazzy_sevM.getInstanceName() + " is available", ref);
+        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        assertTrue("Check the FooService invocation", fs.foo());
+        assertEquals("Check the creation of 1 object", 1, ((PrimitiveInstanceDescription) lazzyArchSevM.getInstanceDescription()).getCreatedObjects().length);
+        FooService fs2 = (FooService) osgiHelper.getServiceObject(ref);
+        assertTrue("Check the FooService invocation-2", fs2.foo());
+        // Only one object as the getService method is called only once (service factory) despite the policy="method".
+        assertEquals("Check the creation of 1 object", 1, ((PrimitiveInstanceDescription) lazzyArchSevM.getInstanceDescription()).getCreatedObjects().length);
+    }
+
+    /**
+     * Test a custom constructor.
+     * Not manipulated.
+     */
+    @Test
+    public void testCustomConstuctor() {
+        FooService fs = new FooProviderType1(0, "foo", bc);
+        Properties props = fs.fooProps();
+        assertEquals("Check bar", 0, ((Integer) props.get("bar")).intValue());
+        assertEquals("Check foo", "foo", props.get("foo"));
+        assertEquals("Check context", bc, props.get("context"));
+    }
+
+    @Test
+    public void testSuperCall() {
+        try {
+            ipojoHelper.createComponentInstance("org.apache.felix.ipojo.runtime.core.components.CallSuperConstructor");
+        } catch (Throwable e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @Test
+    public void testSuperCallWithNew() {
+        try {
+            ipojoHelper.createComponentInstance("org.apache.felix.ipojo.runtime.core.components.CallSuperConstructorWithNew");
+        } catch (Throwable e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @Test
+    public void testSuperSuperCallWithNew() {
+        try {
+            ipojoHelper.createComponentInstance("org.apache.felix.ipojo.runtime.core.components.CallSuperSuperConstructorWithNew");
+        } catch (Throwable e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @Test
+    public void testSuperCallWithBC() {
+        try {
+            ipojoHelper.createComponentInstance("org.apache.felix.ipojo.runtime.core.components.CallSuperConstructorWithBC");
+        } catch (Throwable e) {
+            fail(e.getMessage());
+        }
+    }
+
+
+}
\ No newline at end of file
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestSeveralConstructor.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestSeveralConstructor.java
new file mode 100644
index 0000000..87d6f53
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-creation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestSeveralConstructor.java
@@ -0,0 +1,53 @@
+package org.apache.felix.ipojo.runtime.core;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.runtime.core.services.CheckService;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.ServiceReference;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class TestSeveralConstructor extends Common {
+
+    private ComponentInstance ci, ci2, ci3;
+
+    @Before
+    public void setUp() {
+        ci = ipojoHelper.createComponentInstance("org.apache.felix.ipojo.runtime.core.components.SeveralConstructors");
+        ci2 = ipojoHelper.createComponentInstance("org.apache.felix.ipojo.runtime.core.components.NoEmptyConstructor");
+        ci3 = ipojoHelper.createComponentInstance("org.apache.felix.ipojo.runtime.core.components.NoEmptyConstructorWithParentClass");
+
+    }
+
+    @Test
+    public void testSeveralConstructor() {
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), ci.getInstanceName());
+        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        assertTrue("Check assignation", cs.check());
+        String name = (String) cs.getProps().get("name");
+        assertEquals("Check message", "hello world", name);
+        //assertNull("Check message", name);
+    }
+
+    @Test
+    public void testNoEmptyConstructor() {
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), ci2.getInstanceName());
+        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        assertFalse("Check assignation", cs.check());
+        String name = (String) cs.getProps().get("name");
+        assertEquals("Check message", "NULL", name);
+    }
+
+    @Test
+    public void testNoEmptyConstructorWithAParentClass() {
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), ci3.getInstanceName());
+        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        assertTrue("Check assignation", cs.check()); // super set name to "hello"
+        String name = (String) cs.getProps().get("name");
+        assertEquals("Check message", "hello", name);
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/pom.xml b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/pom.xml
new file mode 100644
index 0000000..a040cb8
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-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.manipulator.manipulator-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-manipulator-manipulation-metadata-test</artifactId>
+
+    <name>${project.artifactId}</name>
+    
+</project>
\ No newline at end of file
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Child.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Child.java
new file mode 100644
index 0000000..1ab2130
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Child.java
@@ -0,0 +1,9 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+public class Child extends Parent {
+
+	public Child(String s) {
+		super(s);
+	}
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooBarProviderType1.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooBarProviderType1.java
new file mode 100644
index 0000000..aa19da1
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooBarProviderType1.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.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.BarService;
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+
+import java.util.Properties;
+
+public class FooBarProviderType1 implements FooService, BarService {
+
+    public boolean foo() {
+        return true;
+    }
+
+    public Properties fooProps() {
+        return new Properties();
+    }
+
+    public boolean bar() {
+        return true;
+    }
+
+    public Properties getProps() {
+        return new Properties();
+    }
+
+    public boolean getBoolean() {
+        return true;
+    }
+
+    public double getDouble() {
+        return 1.0;
+    }
+
+    public int getInt() {
+        return 1;
+    }
+
+    public long getLong() {
+        return 1;
+    }
+
+    public Boolean getObject() {
+        return new Boolean(true);
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderType1.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderType1.java
new file mode 100644
index 0000000..12d4d6a
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderType1.java
@@ -0,0 +1,128 @@
+/* 
+ * 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.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+import org.osgi.framework.BundleContext;
+
+import java.util.Properties;
+
+public class FooProviderType1 implements FooService {
+
+    private int m_bar;
+    private String m_foo;
+
+    private BundleContext m_context;
+
+    private static FooProviderType1 singleton;
+    private static int count = 0;
+
+    private static FooProviderType1 singleton(BundleContext bc) {
+        if (singleton == null) {
+            count++;
+            singleton = new FooProviderType1(bc);
+        }
+        return singleton;
+    }
+
+    public static FooProviderType1 several(BundleContext bc) {
+        count++;
+        return new FooProviderType1(bc);
+    }
+
+    public FooProviderType1(BundleContext bc) {
+        if (bc == null) {
+            throw new RuntimeException("Injected bundle context null");
+        }
+        m_context = bc;
+    }
+
+    public boolean foo() {
+        return true;
+    }
+
+    public Properties fooProps() {
+        Properties p = new Properties();
+        p.put("bar", new Integer(m_bar));
+        if (m_foo != null) {
+            p.put("foo", m_foo);
+        }
+        p.put("context", m_context);
+
+        p.put("count", new Integer(count));
+        return p;
+    }
+
+    public void testException() throws Exception {
+        String a = "foobarbaz";
+        throw new Exception("foo" + a);
+    }
+
+    public void testTry() {
+        String a = "foo";
+        a.charAt(0);
+    }
+
+    public void testTry2(String s) {
+        String a = "foo";
+        a.charAt(0);
+    }
+
+    private void nexttry(String s) {
+        try {
+            s += "foo";
+        } catch (RuntimeException e) {
+
+        }
+    }
+
+    public boolean getBoolean() {
+        return true;
+    }
+
+    public double getDouble() {
+        return 1.0;
+    }
+
+    public int getInt() {
+        return 1;
+    }
+
+    public long getLong() {
+        return 1;
+    }
+
+    public Boolean getObject() {
+        return new Boolean(true);
+    }
+
+    /**
+     * Custom constructor.
+     *
+     * @param bar
+     * @param foo
+     * @param bc
+     */
+    public FooProviderType1(int bar, String foo, BundleContext bc) {
+        m_bar = bar;
+        m_foo = foo;
+        m_context = bc;
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderTypeDyn.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderTypeDyn.java
new file mode 100644
index 0000000..b23152b
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderTypeDyn.java
@@ -0,0 +1,76 @@
+/* 
+ * 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.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+
+import java.util.Properties;
+
+public class FooProviderTypeDyn implements FooService {
+
+    private int intProp;
+    private String strProp;
+    private String[] strAProp;
+    private int[] intAProp;
+    private boolean boolProp;
+
+    public boolean foo() {
+        intProp = 3;
+        boolProp = true;
+        if (strProp.equals("foo")) {
+            strProp = "bar";
+        } else {
+            strProp = "foo";
+        }
+        strAProp = new String[]{"foo", "bar", "baz"};
+        intAProp = new int[]{3, 2, 1};
+        return true;
+    }
+
+    public Properties fooProps() {
+        Properties p = new Properties();
+        p.put("intProp", new Integer(intProp));
+        p.put("boolProp", new Boolean(boolProp));
+        p.put("strProp", strProp);
+        p.put("strAProp", strAProp);
+        p.put("intAProp", intAProp);
+        return p;
+    }
+
+    public boolean getBoolean() {
+        return true;
+    }
+
+    public double getDouble() {
+        return 1.0;
+    }
+
+    public int getInt() {
+        return 1;
+    }
+
+    public long getLong() {
+        return 1;
+    }
+
+    public Boolean getObject() {
+        return new Boolean(true);
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Manipulation23Tester.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Manipulation23Tester.java
new file mode 100644
index 0000000..6ff3408
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Manipulation23Tester.java
@@ -0,0 +1,188 @@
+/* 
+ * 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.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.PrimitiveManipulationTestService;
+
+
+public class Manipulation23Tester implements PrimitiveManipulationTestService {
+
+    // Integer types
+    byte b = 1;
+    short s = 1;
+    int i = 1;
+    long l = 1;
+
+    // Floatting types
+    double d = 1.1;
+    float f = 1.1f;
+
+    // Character
+    char c = 'a';
+
+    // Boolean
+    boolean bool = false;
+
+    // Integer arrays
+    byte[] bs = new byte[]{0, 1, 2};
+    short[] ss = new short[]{0, 1, 2};
+    int[] is = new int[]{0, 1, 2};
+    long[] ls = new long[]{0, 1, 2};
+
+    double[] ds = new double[]{0.0, 1.1, 2.2};
+    float[] fs = new float[]{0.0f, 1.1f, 2.2f};
+
+    char[] cs = new char[]{'a', 'b', 'c'};
+
+    boolean[] bools = new boolean[]{false, true, false};
+
+    public boolean getBoolean() {
+        return bool;
+    }
+
+    public boolean[] getBooleans() {
+        return bools;
+    }
+
+    public byte getByte() {
+        return b;
+    }
+
+    public byte[] getBytes() {
+        return bs;
+    }
+
+    public char getChar() {
+        return c;
+    }
+
+    public char[] getChars() {
+        return cs;
+    }
+
+    public double getDouble() {
+        return d;
+    }
+
+    public double[] getDoubles() {
+        return ds;
+    }
+
+    public float getFloat() {
+        return f;
+    }
+
+    public float[] getFloats() {
+        return fs;
+    }
+
+    public int getInt() {
+        return i;
+    }
+
+    public int[] getInts() {
+        return is;
+    }
+
+    public long getLong() {
+        return l;
+    }
+
+    public long[] getLongs() {
+        return ls;
+    }
+
+    public short getShort() {
+        return s;
+    }
+
+    public short[] getShorts() {
+        return ss;
+    }
+
+    public void setBoolean(boolean b) {
+        this.bool = b;
+    }
+
+    public void setBooleans(boolean[] bs) {
+        this.bools = bs;
+    }
+
+    public void setByte(byte b) {
+        this.b = b;
+    }
+
+    public void setBytes(byte[] bs) {
+        this.bs = bs;
+    }
+
+    public void setChar(char c) {
+        this.c = c;
+    }
+
+    public void setChars(char[] cs) {
+        this.cs = cs;
+    }
+
+    public void setDouble(double d) {
+        this.d = d;
+    }
+
+    public void setDoubles(double[] ds) {
+        this.ds = ds;
+    }
+
+    public void setFloat(float f) {
+        this.f = f;
+    }
+
+    public void setFloats(float[] fs) {
+        this.fs = fs;
+    }
+
+    public void setInt(int i) {
+        this.i = i;
+    }
+
+    public void setInts(int[] is) {
+        this.is = is;
+    }
+
+    public void setLong(long l) {
+        this.l = l;
+    }
+
+    public void setLongs(long[] ls) {
+        this.ls = ls;
+    }
+
+    public void setShort(short s) {
+        this.s = s;
+    }
+
+    public void setShorts(short[] ss) {
+        this.ss = ss;
+    }
+
+    // This method has been added to test an issue when autoboxing.
+    public void setLong(long l, String s) {
+        this.l = l;
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Multiconstructor.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Multiconstructor.java
new file mode 100644
index 0000000..bb4746d
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Multiconstructor.java
@@ -0,0 +1,17 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+public class Multiconstructor {
+
+	public Multiconstructor(String s1, String s2) {
+		this(s1, s2, -1);
+	}
+
+	public Multiconstructor(String s1, int s2) {
+		this(s1, "" + s2, s2);
+	}
+
+	public Multiconstructor(String s1, String s2, int i) {
+		//...
+	}
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/MultipleCheckService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/MultipleCheckService.java
new file mode 100644
index 0000000..938fe4d
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/MultipleCheckService.java
@@ -0,0 +1,158 @@
+/* 
+ * 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.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.CheckService;
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+import org.osgi.framework.ServiceReference;
+
+import java.util.Properties;
+
+public class MultipleCheckService implements CheckService {
+
+    FooService fs[];
+
+    int simpleB = 0;
+
+    int objectB = 0;
+
+    int refB = 0;
+
+    int bothB = 0;
+
+    int simpleU = 0;
+
+    int objectU = 0;
+
+    int refU = 0;
+
+    int bothU = 0;
+
+    public boolean check() {
+        boolean r = fs.length != 0;
+        for (int i = 0; i < fs.length; i++) {
+            r = r & fs[i].foo();
+        }
+        return r;
+    }
+
+    private boolean getBoolean() {
+        return check();
+    }
+
+    private int getInt() {
+        int r = 0;
+        for (int i = 0; i < fs.length; i++) {
+            r = r + fs[i].getInt();
+        }
+        return r;
+    }
+
+    private long getLong() {
+        long r = 0;
+        for (int i = 0; i < fs.length; i++) {
+            r = r + fs[i].getLong();
+        }
+        return r;
+    }
+
+    private double getDouble() {
+        double r = 0.0;
+        for (int i = 0; i < fs.length; i++) {
+            r = r + fs[i].getInt();
+        }
+        return r;
+    }
+
+    protected Object doNothing(Object o, String s) {
+        return null;
+    }
+
+    // private Object getObject() {
+    // boolean r = true;
+    // for(int i = 0; i < fs.length; i++) {
+    // r = r && ((Boolean) fs[i].getObject()).booleanValue();
+    // }
+    // return new Boolean(r);
+    // }
+
+    public Properties getProps() {
+        Properties props = new Properties();
+        props.put("result", new Boolean(check()));
+        props.put("voidB", new Integer(simpleB));
+        props.put("objectB", new Integer(objectB));
+        props.put("refB", new Integer(refB));
+        props.put("bothB", new Integer(bothB));
+        props.put("voidU", new Integer(simpleU));
+        props.put("objectU", new Integer(objectU));
+        props.put("refU", new Integer(refU));
+        props.put("bothU", new Integer(bothU));
+        props.put("boolean", new Boolean(getBoolean()));
+        props.put("int", new Integer(getInt()));
+        props.put("long", new Long(getLong()));
+        props.put("double", new Double(getDouble()));
+
+        return props;
+    }
+
+    public void voidBind() {
+        simpleB++;
+    }
+
+    public void voidUnbind() {
+        simpleU++;
+    }
+
+    public void objectBind(FooService o) {
+        if (o != null && o instanceof FooService) {
+            objectB++;
+        }
+    }
+
+    public void objectUnbind(FooService o) {
+        if (o != null && o instanceof FooService) {
+            objectU++;
+        }
+    }
+
+    public void refBind(ServiceReference sr) {
+        if (sr != null) {
+            refB++;
+        }
+    }
+
+    public void refUnbind(ServiceReference sr) {
+        if (sr != null) {
+            refU++;
+        }
+    }
+
+    public void bothBind(FooService o, ServiceReference sr) {
+        if (o != null && o instanceof FooService && sr != null) {
+            bothB++;
+        }
+    }
+
+    public void bothUnbind(FooService o, ServiceReference sr) {
+        if (o != null && o instanceof FooService && sr != null) {
+            bothU++;
+        }
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Parent.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Parent.java
new file mode 100644
index 0000000..40e3395
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Parent.java
@@ -0,0 +1,15 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+public class Parent {
+
+	private String s;
+
+	public Parent(String s) {
+		this.s = s;
+	}
+
+	public String getS() {
+		return s;
+	}
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/A123/CheckService2.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/A123/CheckService2.java
new file mode 100644
index 0000000..e31a24a
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/A123/CheckService2.java
@@ -0,0 +1,25 @@
+/* 
+ * 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.runtime.core.services.A123;
+
+public interface CheckService2 {
+	
+	public boolean check();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BarService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BarService.java
new file mode 100644
index 0000000..f704138
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BarService.java
@@ -0,0 +1,29 @@
+/* 
+ * 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.runtime.core.services;
+
+import java.util.Properties;
+
+public interface BarService {
+	
+	public boolean bar();
+	
+	public Properties getProps();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/CheckService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/CheckService.java
new file mode 100644
index 0000000..eca0faa
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/CheckService.java
@@ -0,0 +1,31 @@
+/* 
+ * 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.runtime.core.services;
+
+import java.util.Properties;
+
+public interface CheckService {
+    
+    public static final String foo = "foo";
+	
+	public boolean check();
+	
+	public Properties getProps();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java
new file mode 100644
index 0000000..37c1a65
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java
@@ -0,0 +1,39 @@
+/* 
+ * 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.runtime.core.services;
+
+import java.util.Properties;
+
+public interface FooService {
+
+	boolean foo();
+	
+	Properties fooProps();
+	
+	Boolean getObject();
+	
+	boolean getBoolean();
+	
+	int getInt();
+	
+	long getLong();
+	
+	double getDouble();
+	
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/Plop.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/Plop.java
new file mode 100644
index 0000000..bbe8a7e
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/Plop.java
@@ -0,0 +1,7 @@
+package org.apache.felix.ipojo.runtime.core.services;
+
+public interface Plop {
+    
+   Object getPlop();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/PrimitiveManipulationTestService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/PrimitiveManipulationTestService.java
new file mode 100644
index 0000000..10a6288
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/PrimitiveManipulationTestService.java
@@ -0,0 +1,75 @@
+/* 
+ * 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.runtime.core.services;
+
+public interface PrimitiveManipulationTestService {
+	
+	byte getByte();
+	void setByte(byte b);
+	
+	short getShort();
+	void setShort(short s);
+	
+	int getInt();
+	void setInt(int i);
+	
+	long getLong();
+	void setLong(long l);
+	
+	float getFloat();
+	void setFloat(float f);
+	
+	double getDouble();
+	void setDouble(double d);
+	
+	char getChar();
+	void setChar(char c);
+	
+	boolean getBoolean();
+	void setBoolean(boolean b);
+	
+	// Array types
+	byte[] getBytes();
+	void setBytes(byte[] bs);
+	
+	short[] getShorts();
+	void setShorts(short[] ss);
+	
+	int[] getInts();
+	void setInts(int is[]);
+	
+	long[] getLongs();
+	void setLongs(long[] ls);
+	
+	float[] getFloats();
+	void setFloats(float[] fs);
+	
+	double[] getDoubles();
+	void setDoubles(double[] ds);
+	
+	char[] getChars();
+	void setChars(char[] cs);
+	
+	boolean[] getBooleans();
+	void setBooleans(boolean[] bs);	
+	
+	// This method has been added to test an issue when autoboxing.
+	void setLong(long l, String s);
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/resources/metadata.xml b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/resources/metadata.xml
new file mode 100644
index 0000000..7b39437
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/main/resources/metadata.xml
@@ -0,0 +1,57 @@
+<ipojo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="org.apache.felix.ipojo hhttp://felix.apache.org/ipojo/schemas/SNAPSHOT/core.xsd"
+    xmlns="org.apache.felix.ipojo"
+>
+	<!-- Simple provider  used for manipulation analysis -->
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.FooProviderType1"
+		name="ManipulationMetadata-FooProviderType-1" architecture="true">
+		<provides />
+	</component>
+
+	<!-- Provider providing 2 services -->
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.FooBarProviderType1"
+		name="ManipulationMetadata-FooBarProviderType-1" architecture="true">
+		<provides />
+	</component>
+
+	<!-- Provider with dynamic property -->
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.FooProviderTypeDyn"
+		name="ManipulationMetadata-FooProviderType-Dyn" architecture="true">
+		<provides>
+			<property name="int" field="intProp" value="2" />
+			<property name="boolean" field="boolProp" value="false" />
+			<property name="string" field="strProp" value="foo" />
+			<property name="strAProp" field="strAProp"
+				value="[foo, bar]" />
+			<property name="intAProp" field="intAProp" value="[ 1,2,3]" />
+		</provides>
+	</component>
+
+	<!-- Manipulation -->
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.Manipulation23Tester"
+		name="ManipulationMetadata-PrimitiveManipulationTester" architecture="true">
+		<provides />
+	</component>
+
+
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.MultipleCheckService"
+		name="ManipulationMetadata-SimpleMultipleCheckServiceProvider" architecture="true">
+		<requires field="fs" />
+		<provides />
+	</component>
+
+
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.Child">
+	</component>
+
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.Multiconstructor">
+    </component>
+</ipojo>
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java
new file mode 100644
index 0000000..39d6474
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java
@@ -0,0 +1,200 @@
+package org.apache.felix.ipojo.runtime.core;
+
+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.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.PerClass;
+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.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
+    BundleContext bc;
+
+    protected OSGiHelper osgiHelper;
+    protected IPOJOHelper ipojoHelper;
+    protected Bundle testedBundle;
+
+    @Configuration
+    public Option[] config() throws IOException {
+        Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
+        root.setLevel(Level.INFO);
+
+        return options(
+                ipojoBundles(),
+                junitBundles(),
+                testedBundle(),
+                systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("WARN")
+        );
+    }
+
+    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")
+        );
+    }
+
+
+    @Before
+    public void commonSetUp() {
+        osgiHelper = new OSGiHelper(bc);
+        ipojoHelper = new IPOJOHelper(bc);
+
+        testedBundle = osgiHelper.getBundle("test.bundle");
+
+        // 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);
+    }
+
+    @After
+    public void commonTearDown() {
+        ipojoHelper.dispose();
+        osgiHelper.dispose();
+    }
+
+    public CompositeOption ipojoBundles() {
+        return new DefaultCompositeOption(
+                mavenBundle("org.apache.felix", "org.apache.felix.ipojo").versionAsInProject(),
+                mavenBundle("org.ow2.chameleon.testing", "osgi-helpers").versionAsInProject(),
+                // configuration admin
+                mavenBundle("org.apache.felix",  "org.apache.felix.configadmin").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.getAbsolutePath().contains("/services")  || file.getAbsolutePath().contains("/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);
+            }
+        }
+
+        // We export components.
+        String export = "org.apache.felix.ipojo.runtime.core.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);
+    }
+
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManipulationMetadata.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManipulationMetadata.java
new file mode 100644
index 0000000..1ae7fe2
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManipulationMetadata.java
@@ -0,0 +1,251 @@
+/* 
+ * 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.runtime.core;
+
+import org.apache.felix.ipojo.metadata.Element;
+import org.apache.felix.ipojo.parser.ManifestMetadataParser;
+import org.apache.felix.ipojo.parser.ParseException;
+import org.apache.felix.ipojo.parser.ParseUtils;
+import org.apache.felix.ipojo.runtime.core.services.BarService;
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.*;
+
+/**
+ * Check manipulation metadata written in the manifest.
+ */
+public class TestManipulationMetadata extends Common {
+
+    @Test
+    public void testGetMetadata() {
+        String header = (String) testedBundle.getHeaders().get("iPOJO-Components");
+        Element elem = null;
+        try {
+            elem = ManifestMetadataParser.parseHeaderMetadata(header);
+        } catch (ParseException e) {
+            fail("Parse Exception when parsing iPOJO-Component");
+        }
+
+        assertNotNull("Check elem not null", elem);
+
+
+        Element manip = getManipulationForComponent(elem, "ManipulationMetadata-FooProviderType-1");
+        assertNotNull("Check manipulation metadata not null for " + "FooProviderType-1", manip);
+    }
+
+    @Test
+    public void testInterface() {
+        String comp_name = "ManipulationMetadata-FooProviderType-1";
+        Element manip = getManipulationForComponent(comp_name);
+        Element[] itf = manip.getElements("Interface");
+        assertEquals("Check interfaces number", itf.length, 1);
+        assertEquals("Check itf name", itf[0].getAttribute("name"), FooService.class.getName());
+    }
+
+    @Test
+    public void testInterfaces() {
+        String comp_name = "ManipulationMetadata-FooBarProviderType-1";
+        Element manip = getManipulationForComponent(comp_name);
+        Element[] itf = manip.getElements("Interface");
+        assertEquals("Check interfaces number", itf.length, 2);
+        assertEquals("Check itf name", itf[0].getAttribute("name"), FooService.class.getName());
+        assertEquals("Check itf name", itf[1].getAttribute("name"), BarService.class.getName());
+    }
+
+    @Test
+    public void testFields() {
+        String comp_name = "ManipulationMetadata-FooProviderType-Dyn";
+        Element manip = getManipulationForComponent(comp_name);
+        Element[] fields = manip.getElements("field");
+        assertEquals("Check field count " + fields.length, fields.length, 5);
+        /*
+        private int intProp;
+		private String strProp;
+		private String[] strAProp;
+		private int[] intAProp;
+		private boolean boolProp;
+		 */
+
+        Element field;
+
+        field = getFieldFromName(manip, "intProp");
+        assertEquals("Check field name : " + field.getAttribute("name"), field.getAttribute("name"), "intProp");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "int");
+
+        field = getFieldFromName(manip, "strProp");
+        assertEquals("Check field name : " + field.getAttribute("name"), field.getAttribute("name"), "strProp");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "java.lang.String");
+
+        field = getFieldFromName(manip, "strAProp");
+        assertEquals("Check field name : " + field.getAttribute("name"), field.getAttribute("name"), "strAProp");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "java.lang.String[]");
+
+        field = getFieldFromName(manip, "intAProp");
+        assertEquals("Check field name : " + field.getAttribute("name"), field.getAttribute("name"), "intAProp");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "int[]");
+
+        field = getFieldFromName(manip, "boolProp");
+        assertEquals("Check field name : " + field.getAttribute("name"), field.getAttribute("name"), "boolProp");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "boolean");
+    }
+
+    @Test
+    public void testPrimitivesFields() {
+        String comp_name = "ManipulationMetadata-PrimitiveManipulationTester";
+        Element manip = getManipulationForComponent(comp_name);
+        Element[] fields = manip.getElements("Field");
+        assertEquals("Check field count", fields.length, 16);
+		/*
+		byte b = 1;
+		short s = 1;
+		int i = 1;
+		long l = 1;
+		double d = 1.1;
+		float f = 1.1f;
+		char c = 'a';
+		boolean bool = false;
+		byte[] bs = new byte[] {0,1,2};
+		short[] ss = new short[] {0,1,2};
+		int[] is = new int[] {0,1,2};
+		long[] ls = new long[] {0,1,2};
+		double[] ds = new double[] {0.0, 1.1, 2.2};
+		float[] fs = new float[] {0.0f, 1.1f, 2.2f};
+		char[] cs = new char[] {'a', 'b', 'c'};
+		boolean[] bools = new boolean[] {false, true, false};
+		 */
+        Element field;
+
+        field = getFieldFromName(manip, "b");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "byte");
+        field = getFieldFromName(manip, "s");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "short");
+        field = getFieldFromName(manip, "i");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "int");
+        field = getFieldFromName(manip, "l");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "long");
+        field = getFieldFromName(manip, "d");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "double");
+        field = getFieldFromName(manip, "f");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "float");
+        field = getFieldFromName(manip, "c");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "char");
+        field = getFieldFromName(manip, "bool");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "boolean");
+
+        field = getFieldFromName(manip, "bs");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "byte[]");
+        field = getFieldFromName(manip, "ss");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "short[]");
+        field = getFieldFromName(manip, "is");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "int[]");
+        field = getFieldFromName(manip, "ls");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "long[]");
+        field = getFieldFromName(manip, "ds");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "double[]");
+        field = getFieldFromName(manip, "fs");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "float[]");
+        field = getFieldFromName(manip, "cs");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "char[]");
+        field = getFieldFromName(manip, "bools");
+        assertEquals("Check field type : " + field.getAttribute("name"), field.getAttribute("type"), "boolean[]");
+    }
+
+    @Test
+    public void testNoArgMethod() {
+        String comp_name = "ManipulationMetadata-SimpleMultipleCheckServiceProvider";
+        Element manip = getManipulationForComponent(comp_name);
+        Element method = getMethodFromName(manip, "check");
+        assertFalse("Check no args", method.containsAttribute("arguments"));
+        assertEquals("Check return", method.getAttribute("return"), "boolean");
+    }
+
+    @Test
+    public void testOneArgsMethod() {
+        String comp_name = "ManipulationMetadata-SimpleMultipleCheckServiceProvider";
+        Element manip = getManipulationForComponent(comp_name);
+        Element method = getMethodFromName(manip, "refBind");
+        assertEquals("Check args", method.getAttribute("arguments"), "{org.osgi.framework.ServiceReference}");
+        assertEquals("Check args count", 1, ParseUtils.parseArrays("{org.osgi.framework.ServiceReference}").length);
+        assertFalse("Check return", method.containsAttribute("return"));
+    }
+
+    @Test
+    public void testTwoArgsMethod() {
+        String comp_name = "ManipulationMetadata-SimpleMultipleCheckServiceProvider";
+        Element manip = getManipulationForComponent(comp_name);
+        Element method = getMethodFromName(manip, "doNothing");
+        assertEquals("Check args", method.getAttribute("arguments"), "{java.lang.Object,java.lang.String}");
+        assertEquals("Check args count", 2, ParseUtils.parseArrays("{java.lang.Object,java.lang.String}").length);
+        assertEquals("Check return", method.getAttribute("return"), "java.lang.Object");
+    }
+
+    private Element getManipulationForComponent(Element metadata, String comp_name) {
+        Element[] comps = metadata.getElements("component");
+        for (Element comp : comps) {
+            if (comp.containsAttribute("factory") && comp.getAttribute("factory").equals(comp_name)) {
+                return comp.getElements("manipulation")[0];
+            }
+            if (comp.containsAttribute("name") && comp.getAttribute("name").equals(comp_name)) {
+                return comp.getElements("manipulation")[0];
+            }
+        }
+        return null;
+    }
+
+    private Element getManipulationForComponent(String comp_name) {
+        String header = (String) testedBundle.getHeaders().get("iPOJO-Components");
+        Element elem = null;
+        try {
+            elem = ManifestMetadataParser.parseHeaderMetadata(header);
+        } catch (ParseException e) {
+            fail("Parse Exception when parsing iPOJO-Component");
+        }
+
+        assertNotNull("Check elem not null", elem);
+        Element manip = getManipulationForComponent(elem, comp_name);
+        assertNotNull("Check manipulation metadata not null for " + comp_name, manip);
+        return manip;
+    }
+
+    private Element getMethodFromName(Element manip, String name) {
+        Element methods[] = manip.getElements("Method");
+        for (int i = 0; i < methods.length; i++) {
+            if (methods[i].containsAttribute("name") && methods[i].getAttribute("name").equals(name)) {
+                return methods[i];
+            }
+        }
+        fail("Method " + name + " not found");
+        return null;
+    }
+
+    private Element getFieldFromName(Element manip, String name) {
+        Element fields[] = manip.getElements("Field");
+        for (int i = 0; i < fields.length; i++) {
+            if (fields[i].containsAttribute("name") && fields[i].getAttribute("name").equals(name)) {
+                return fields[i];
+            }
+        }
+        fail("Field " + name + " not found");
+        return null;
+    }
+
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManipulationMetadataAPI.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManipulationMetadataAPI.java
new file mode 100644
index 0000000..2ffdb0a
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-metadata-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManipulationMetadataAPI.java
@@ -0,0 +1,298 @@
+/* 
+ * 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.runtime.core;
+
+import org.apache.felix.ipojo.ConfigurationException;
+import org.apache.felix.ipojo.metadata.Element;
+import org.apache.felix.ipojo.parser.*;
+import org.apache.felix.ipojo.runtime.core.services.BarService;
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+import org.junit.Before;
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.*;
+
+public class TestManipulationMetadataAPI extends Common {
+
+    PojoMetadata FooProviderType1, FooBarProviderType1, FooProviderTypeDyn, PrimitiveManipulationTester, SimpleMultipleCheckServiceProvider;
+
+    @Before
+    public void setUp() {
+        String comp_name = "ManipulationMetadata-FooProviderType-1";
+        FooProviderType1 = getManipulationMetadataForComponent(comp_name);
+
+        comp_name = "ManipulationMetadata-FooBarProviderType-1";
+        FooBarProviderType1 = getManipulationMetadataForComponent(comp_name);
+
+        comp_name = "ManipulationMetadata-FooProviderType-Dyn";
+        FooProviderTypeDyn = getManipulationMetadataForComponent(comp_name);
+
+        comp_name = "ManipulationMetadata-PrimitiveManipulationTester";
+        PrimitiveManipulationTester = getManipulationMetadataForComponent(comp_name);
+
+        comp_name = "ManipulationMetadata-SimpleMultipleCheckServiceProvider";
+        SimpleMultipleCheckServiceProvider = getManipulationMetadataForComponent(comp_name);
+    }
+
+    @Test
+    public void testGetMetadata() {
+        String header = (String) testedBundle.getHeaders().get("iPOJO-Components");
+        Element elem = null;
+        try {
+            elem = ManifestMetadataParser.parseHeaderMetadata(header);
+        } catch (ParseException e) {
+            fail("Parse Exception when parsing iPOJO-Component");
+        }
+
+        assertNotNull("Check elem not null", elem);
+
+        Element manip = getMetadataForComponent(elem, "ManipulationMetadata-FooProviderType-1");
+        assertNotNull("Check manipulation metadata not null for " + "Manipulation-FooProviderType-1", manip);
+        PojoMetadata mm;
+        try {
+            mm = new PojoMetadata(manip);
+            assertNotNull("Check mm not null", mm);
+        } catch (ConfigurationException e) {
+            fail("The creation of pojo metadata has failed");
+        }
+    }
+
+    @Test
+    public void testInterface() {
+        PojoMetadata manip = FooProviderType1;
+
+        String[] itf = manip.getInterfaces();
+        assertEquals("Check interfaces number", itf.length, 1);
+        assertEquals("Check itf name", itf[0], FooService.class.getName());
+
+        assertTrue("Check Foo Service implementation", manip.isInterfaceImplemented(FooService.class.getName()));
+        assertFalse("Check Bar Service implementation", manip.isInterfaceImplemented(BarService.class.getName()));
+    }
+
+    @Test
+    public void testInterfaces() {
+        PojoMetadata manip = FooBarProviderType1;
+        String[] itf = manip.getInterfaces();
+        assertEquals("Check interfaces number", itf.length, 2);
+        assertEquals("Check itf name", itf[0], FooService.class.getName());
+        assertEquals("Check itf name", itf[1], BarService.class.getName());
+
+        assertTrue("Check Foo Service implementation", manip.isInterfaceImplemented(FooService.class.getName()));
+        assertTrue("Check Bar Service implementation", manip.isInterfaceImplemented(BarService.class.getName()));
+    }
+
+    @Test
+    public void testFields() {
+        PojoMetadata manip = FooProviderTypeDyn;
+
+        FieldMetadata[] fields = manip.getFields();
+        assertEquals("Check field count + " + fields.length, fields.length, 5);
+        /*
+        private int intProp;
+		private String strProp;
+		private String[] strAProp;
+		private int[] intAProp;
+		private boolean boolProp;
+		 */
+
+        FieldMetadata field;
+
+        field = manip.getField("intProp");
+        assertEquals("Check field name : " + field.getFieldName(), field.getFieldName(), "intProp");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "int");
+        assertEquals("Check field reflective type : " + field.getFieldName(), FieldMetadata.getReflectionType(field.getFieldType()), "int");
+
+        field = manip.getField("intProp", "int");
+        assertEquals("Check field name : " + field.getFieldName(), field.getFieldName(), "intProp");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "int");
+
+        field = manip.getField("intProp", "long");
+        assertNull("Check bad field", field);
+
+        field = manip.getField("strProp");
+        assertEquals("Check field name : " + field.getFieldName(), field.getFieldName(), "strProp");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "java.lang.String");
+        assertEquals("Check field reflective type : " + field.getFieldName(), FieldMetadata.getReflectionType(field.getFieldType()), "java.lang.String");
+
+        field = manip.getField("strProp", "String");
+        assertNull("Check bad field", field);
+
+        field = manip.getField("strProp", "java.lang.String");
+        assertEquals("Check field name : " + field.getFieldName(), field.getFieldName(), "strProp");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "java.lang.String");
+
+        field = manip.getField("strAProp");
+        assertEquals("Check field name : " + field.getFieldName(), field.getFieldName(), "strAProp");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "java.lang.String[]");
+        assertEquals("Check field reflective type : " + field.getFieldName() + " -> " + FieldMetadata.getReflectionType(field.getFieldType()), FieldMetadata.getReflectionType(field.getFieldType()), "[Ljava.lang.String;");
+
+        field = manip.getField("strAProp", "java.lang.String[]");
+        assertEquals("Check field name : " + field.getFieldName(), field.getFieldName(), "strAProp");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "java.lang.String[]");
+
+        field = manip.getField("strAProp", "String[]");
+        assertNull("Check bad field", field);
+
+        field = manip.getField("intAProp");
+        assertEquals("Check field name : " + field.getFieldName(), field.getFieldName(), "intAProp");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "int[]");
+        assertEquals("Check field reflective type : " + field.getFieldName() + " -> " + FieldMetadata.getReflectionType(field.getFieldType()), FieldMetadata.getReflectionType(field.getFieldType()), "[I");
+
+        field = manip.getField("intAProp", "int[]");
+        assertEquals("Check field name : " + field.getFieldName(), field.getFieldName(), "intAProp");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "int[]");
+
+        field = manip.getField("intAProp", "String[]");
+        assertNull("Check bad field", field);
+
+        field = manip.getField("boolProp");
+        assertEquals("Check field name : " + field.getFieldName(), field.getFieldName(), "boolProp");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "boolean");
+        assertEquals("Check field reflective type : " + field.getFieldName(), FieldMetadata.getReflectionType(field.getFieldType()), "boolean");
+
+        field = manip.getField("boolProp", "boolean");
+        assertEquals("Check field name : " + field.getFieldName(), field.getFieldName(), "boolProp");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "boolean");
+
+        field = manip.getField("boolProp", "bool");
+        assertNull("Check bad field", field);
+    }
+
+    @Test
+    public void testPrimitivesFields() {
+        PojoMetadata manip = PrimitiveManipulationTester;
+        FieldMetadata[] fields = manip.getFields();
+        assertEquals("Check field count", fields.length, 16);
+
+        FieldMetadata field;
+
+        field = manip.getField("b");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "byte");
+        field = manip.getField("s");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "short");
+        field = manip.getField("i");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "int");
+        field = manip.getField("l");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "long");
+        field = manip.getField("d");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "double");
+        field = manip.getField("f");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "float");
+        field = manip.getField("c");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "char");
+        field = manip.getField("bool");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "boolean");
+
+        field = manip.getField("bs");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "byte[]");
+        field = manip.getField("ss");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "short[]");
+        field = manip.getField("is");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "int[]");
+        field = manip.getField("ls");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "long[]");
+        field = manip.getField("ds");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "double[]");
+        field = manip.getField("fs");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "float[]");
+        field = manip.getField("cs");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "char[]");
+        field = manip.getField("bools");
+        assertEquals("Check field type : " + field.getFieldName(), field.getFieldType(), "boolean[]");
+    }
+
+    @Test
+    public void testNoArgMethod() {
+        PojoMetadata manip = SimpleMultipleCheckServiceProvider;
+        MethodMetadata method = manip.getMethod("check");
+        assertEquals("Check no args", method.getMethodArguments().length, 0);
+        assertEquals("Check return", method.getMethodReturn(), "boolean");
+
+        method = manip.getMethod("check", new String[0]);
+        assertEquals("Check no args", method.getMethodArguments().length, 0);
+        assertEquals("Check return", method.getMethodReturn(), "boolean");
+    }
+
+    @Test
+    public void testOneArgsMethod() {
+        PojoMetadata manip = SimpleMultipleCheckServiceProvider;
+        MethodMetadata method = manip.getMethods("refBind")[0];
+        assertEquals("Check args count", method.getMethodArguments().length, 1);
+        assertEquals("Check args", method.getMethodArguments()[0], "org.osgi.framework.ServiceReference");
+        assertEquals("Check return", method.getMethodReturn(), "void");
+
+        method = manip.getMethod("refBind", new String[]{"org.osgi.framework.ServiceReference"});
+        assertEquals("Check args count", method.getMethodArguments().length, 1);
+        assertEquals("Check args", method.getMethodArguments()[0], "org.osgi.framework.ServiceReference");
+        assertEquals("Check return", method.getMethodReturn(), "void");
+    }
+
+    @Test
+    public void testTwoArgsMethod() {
+        PojoMetadata manip = SimpleMultipleCheckServiceProvider;
+        MethodMetadata method = manip.getMethods("doNothing")[0];
+        assertEquals("Check args count", 2, method.getMethodArguments().length);
+        assertEquals("Check args - 1", method.getMethodArguments()[0], "java.lang.Object");
+        assertEquals("Check args - 2", method.getMethodArguments()[1], "java.lang.String");
+        assertEquals("Check return", method.getMethodReturn(), "java.lang.Object");
+
+        method = manip.getMethod("doNothing", new String[]{"java.lang.Object", "java.lang.String"});
+        assertEquals("Check args count", 2, method.getMethodArguments().length);
+        assertEquals("Check args - 1", method.getMethodArguments()[0], "java.lang.Object");
+        assertEquals("Check args - 2", method.getMethodArguments()[1], "java.lang.String");
+        assertEquals("Check return", method.getMethodReturn(), "java.lang.Object");
+    }
+
+    private Element getMetadataForComponent(Element metadata, String comp_name) {
+        Element[] comps = metadata.getElements("component");
+        for (int i = 0; i < comps.length; i++) {
+            if (comps[i].containsAttribute("factory") && comps[i].getAttribute("factory").equals(comp_name)) {
+                return comps[i];
+            }
+            if (comps[i].containsAttribute("name") && comps[i].getAttribute("name").equals(comp_name)) {
+                return comps[i];
+            }
+        }
+        return null;
+    }
+
+
+    private PojoMetadata getManipulationMetadataForComponent(String comp_name) {
+        String header = (String) testedBundle.getHeaders().get("iPOJO-Components");
+        Element elem = null;
+        try {
+            elem = ManifestMetadataParser.parseHeaderMetadata(header);
+        } catch (ParseException e) {
+            fail("Parse Exception when parsing iPOJO-Component");
+        }
+
+        assertNotNull("Check elem not null", elem);
+
+        Element manip = getMetadataForComponent(elem, comp_name);
+        assertNotNull("Check manipulation metadata not null for " + comp_name, manip);
+        try {
+            return new PojoMetadata(manip);
+        } catch (ConfigurationException e) {
+            fail("The creation of pojo metadata for " + comp_name + " has failed");
+            return null;
+        }
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/pom.xml b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/pom.xml
new file mode 100644
index 0000000..8715515
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-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.manipulator.manipulator-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-manipulator-manipulation-test</artifactId>
+
+    <name>${project.artifactId}</name>
+    
+</project>
\ No newline at end of file
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/A123/Manipulation23Tester.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/A123/Manipulation23Tester.java
new file mode 100644
index 0000000..24d51e5
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/A123/Manipulation23Tester.java
@@ -0,0 +1,188 @@
+/* 
+ * 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.runtime.core.components.A123;
+
+import org.apache.felix.ipojo.runtime.core.services.PrimitiveManipulationTestService;
+
+
+public class Manipulation23Tester implements PrimitiveManipulationTestService {
+
+
+    // Integer types
+    byte b = 1;
+    short s = 1;
+    int i = 1;
+    long l = 1;
+
+    // Floatting types
+    double d = 1.1;
+    float f = 1.1f;
+
+    // Character
+    char c = 'a';
+
+    // Boolean
+    boolean bool = false;
+
+    // Integer arrays
+    byte[] bs = new byte[]{0, 1, 2};
+    short[] ss = new short[]{0, 1, 2};
+    int[] is = new int[]{0, 1, 2};
+    long[] ls = new long[]{0, 1, 2};
+
+    double[] ds = new double[]{0.0, 1.1, 2.2};
+    float[] fs = new float[]{0.0f, 1.1f, 2.2f};
+
+    char[] cs = new char[]{'a', 'b', 'c'};
+
+    boolean[] bools = new boolean[]{false, true, false};
+
+    public boolean getBoolean() {
+        return bool;
+    }
+
+    public boolean[] getBooleans() {
+        return bools;
+    }
+
+    public byte getByte() {
+        return b;
+    }
+
+    public byte[] getBytes() {
+        return bs;
+    }
+
+    public char getChar() {
+        return c;
+    }
+
+    public char[] getChars() {
+        return cs;
+    }
+
+    public double getDouble() {
+        return d;
+    }
+
+    public double[] getDoubles() {
+        return ds;
+    }
+
+    public float getFloat() {
+        return f;
+    }
+
+    public float[] getFloats() {
+        return fs;
+    }
+
+    public int getInt() {
+        return i;
+    }
+
+    public int[] getInts() {
+        return is;
+    }
+
+    public long getLong() {
+        return l;
+    }
+
+    public long[] getLongs() {
+        return ls;
+    }
+
+    public short getShort() {
+        return s;
+    }
+
+    public short[] getShorts() {
+        return ss;
+    }
+
+    public void setBoolean(boolean b) {
+        this.bool = b;
+    }
+
+    public void setBooleans(boolean[] bs) {
+        this.bools = bs;
+    }
+
+    public void setByte(byte b) {
+        this.b = b;
+    }
+
+    public void setBytes(byte[] bs) {
+        this.bs = bs;
+    }
+
+    public void setChar(char c) {
+        this.c = c;
+    }
+
+    public void setChars(char[] cs) {
+        this.cs = cs;
+    }
+
+    public void setDouble(double d) {
+        this.d = d;
+    }
+
+    public void setDoubles(double[] ds) {
+        this.ds = ds;
+    }
+
+    public void setFloat(float f) {
+        this.f = f;
+    }
+
+    public void setFloats(float[] fs) {
+        this.fs = fs;
+    }
+
+    public void setInt(int i) {
+        this.i = i;
+    }
+
+    public void setInts(int[] is) {
+        this.is = is;
+    }
+
+    public void setLong(long l) {
+        this.l = l;
+    }
+
+    public void setLongs(long[] ls) {
+        this.ls = ls;
+    }
+
+    public void setShort(short s) {
+        this.s = s;
+    }
+
+    public void setShorts(short[] ss) {
+        this.ss = ss;
+    }
+
+    public void setLong(long l, String s) {
+        this.l = l;
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Annotation.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Annotation.java
new file mode 100644
index 0000000..c522eba
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Annotation.java
@@ -0,0 +1,44 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+public class Annotation {
+
+    @Marker(name = "marker", type = Marker.Type.BAR,
+            sub = @SubMarker(subname = "foo"),
+            arrayOfObjects = {"foo", "bar", "baz"},
+            arrayOfAnnotations = {@SubMarker(subname = "foo")}
+    )
+    @SubMarker(subname = "bar")
+    @Invisible
+    public void doSomething() {
+        System.out.println("Foo ...");
+    }
+
+    @Marker(name = "marker", type = Marker.Type.BAR,
+            sub = @SubMarker(subname = "foo"),
+            arrayOfObjects = {"foo", "bar", "baz"},
+            arrayOfAnnotations = {@SubMarker(subname = "foo")}
+    )
+    @SubMarker(subname = "bar")
+    @Invisible
+    public Annotation() {
+
+    }
+
+    public void doSomethingWithParams(@Marker(name = "marker", type = Marker.Type.BAR,
+            sub = @SubMarker(subname = "foo"),
+            arrayOfObjects = {"foo", "bar", "baz"},
+            arrayOfAnnotations = {@SubMarker(subname = "foo")}) String foo,
+                                      @Invisible String bar,
+                                      @bla @SubMarker(subname = "baz") String baz) {
+        System.out.println("Foo ...");
+    }
+
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface bla {
+
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderType1.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderType1.java
new file mode 100644
index 0000000..12d4d6a
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooProviderType1.java
@@ -0,0 +1,128 @@
+/* 
+ * 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.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+import org.osgi.framework.BundleContext;
+
+import java.util.Properties;
+
+public class FooProviderType1 implements FooService {
+
+    private int m_bar;
+    private String m_foo;
+
+    private BundleContext m_context;
+
+    private static FooProviderType1 singleton;
+    private static int count = 0;
+
+    private static FooProviderType1 singleton(BundleContext bc) {
+        if (singleton == null) {
+            count++;
+            singleton = new FooProviderType1(bc);
+        }
+        return singleton;
+    }
+
+    public static FooProviderType1 several(BundleContext bc) {
+        count++;
+        return new FooProviderType1(bc);
+    }
+
+    public FooProviderType1(BundleContext bc) {
+        if (bc == null) {
+            throw new RuntimeException("Injected bundle context null");
+        }
+        m_context = bc;
+    }
+
+    public boolean foo() {
+        return true;
+    }
+
+    public Properties fooProps() {
+        Properties p = new Properties();
+        p.put("bar", new Integer(m_bar));
+        if (m_foo != null) {
+            p.put("foo", m_foo);
+        }
+        p.put("context", m_context);
+
+        p.put("count", new Integer(count));
+        return p;
+    }
+
+    public void testException() throws Exception {
+        String a = "foobarbaz";
+        throw new Exception("foo" + a);
+    }
+
+    public void testTry() {
+        String a = "foo";
+        a.charAt(0);
+    }
+
+    public void testTry2(String s) {
+        String a = "foo";
+        a.charAt(0);
+    }
+
+    private void nexttry(String s) {
+        try {
+            s += "foo";
+        } catch (RuntimeException e) {
+
+        }
+    }
+
+    public boolean getBoolean() {
+        return true;
+    }
+
+    public double getDouble() {
+        return 1.0;
+    }
+
+    public int getInt() {
+        return 1;
+    }
+
+    public long getLong() {
+        return 1;
+    }
+
+    public Boolean getObject() {
+        return new Boolean(true);
+    }
+
+    /**
+     * Custom constructor.
+     *
+     * @param bar
+     * @param foo
+     * @param bc
+     */
+    public FooProviderType1(int bar, String foo, BundleContext bc) {
+        m_bar = bar;
+        m_foo = foo;
+        m_context = bc;
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooServiceImpl.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooServiceImpl.java
new file mode 100644
index 0000000..76dc70e
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/FooServiceImpl.java
@@ -0,0 +1,44 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+
+import java.util.Properties;
+
+public class FooServiceImpl implements FooService {
+
+    public boolean foo() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    public Properties fooProps() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public boolean getBoolean() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    public double getDouble() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public int getInt() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public long getLong() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    public Boolean getObject() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/InnerClasses.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/InnerClasses.java
new file mode 100644
index 0000000..8e94123
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/InnerClasses.java
@@ -0,0 +1,168 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.CheckService;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class InnerClasses implements CheckService {
+    
+    private String privateObject;
+    private int privateInt;
+    
+    protected String protectedObject;
+    protected int protectedInt;
+    
+    String packageObject;
+    int packageInt;
+    
+    public String publicObject;
+    public int publicInt;
+    
+    private String nonObject = "not-managed";
+    private int nonInt = 5;
+    
+    private static int staticint = 6;
+
+    public boolean check() {
+        return true;
+    }
+
+    public Properties getProps() {
+        Properties props = new Properties();
+        props.put("publicInner", new PublicNested().doSomething());
+        props.put("packageInner", new PackageNested().doSomething());
+        props.put("protectedInner", new ProtectedNested().doSomething());
+        props.put("privateInner", new PrivateNested().doSomething());
+        props.put("constructorInner", new ConstructorNested().doSomething());
+        props.put("staticInner", new StaticNested().doSomething());
+        
+        Job anonymous = new Job()  {
+            public Map doSomething() {
+                Map map = new HashMap();
+                map.put("publicObject", publicObject);
+                map.put("publicInt", new Integer(publicInt));
+                map.put("packageObject", packageObject);
+                map.put("packageInt", new Integer(packageInt));
+                map.put("protectedObject", protectedObject);
+                map.put("protectedInt", new Integer(protectedInt));
+                map.put("privateObject", privateObject);
+                map.put("privateInt", new Integer(privateInt));
+                map.put("nonObject", nonObject);
+                map.put("nonInt", new Integer(nonInt));
+                return map;
+            }
+        };
+        
+        props.put("anonymous", anonymous.doSomething());
+        props.put("public", new PublicNested());
+        
+        
+        return props;
+    }
+    
+    private class PrivateNested implements Job {
+        public Map doSomething() {
+            Map map = new HashMap();
+            map.put("publicObject", publicObject);
+            map.put("publicInt", new Integer(publicInt));
+            map.put("packageObject", packageObject);
+            map.put("packageInt", new Integer(packageInt));
+            map.put("protectedObject", protectedObject);
+            map.put("protectedInt", new Integer(protectedInt));
+            map.put("privateObject", privateObject);
+            map.put("privateInt", new Integer(privateInt));
+            map.put("nonObject", nonObject);
+            map.put("nonInt", new Integer(nonInt));
+            return map;
+        }
+    }
+    
+    public class PublicNested implements Job {
+        public Map doSomething() {
+            Map map = new HashMap();
+            map.put("publicObject", publicObject);
+            map.put("publicInt", new Integer(publicInt));
+            map.put("packageObject", packageObject);
+            map.put("packageInt", new Integer(packageInt));
+            map.put("protectedObject", protectedObject);
+            map.put("protectedInt", new Integer(protectedInt));
+            map.put("privateObject", privateObject);
+            map.put("privateInt", new Integer(privateInt));
+            map.put("nonObject", nonObject);
+            map.put("nonInt", new Integer(nonInt));
+            return map;
+        }
+    }
+    
+    class PackageNested implements Job {
+        public Map doSomething() {
+            Map map = new HashMap();
+            map.put("publicObject", publicObject);
+            map.put("publicInt", new Integer(publicInt));
+            map.put("packageObject", packageObject);
+            map.put("packageInt", new Integer(packageInt));
+            map.put("protectedObject", protectedObject);
+            map.put("protectedInt", new Integer(protectedInt));
+            map.put("privateObject", privateObject);
+            map.put("privateInt", new Integer(privateInt));
+            map.put("nonObject", nonObject);
+            map.put("nonInt", new Integer(nonInt));
+            return map;
+        }
+    }
+    
+    protected class ProtectedNested implements Job {
+        public Map doSomething() {
+            Map map = new HashMap();
+            map.put("publicObject", publicObject);
+            map.put("publicInt", new Integer(publicInt));
+            map.put("packageObject", packageObject);
+            map.put("packageInt", new Integer(packageInt));
+            map.put("protectedObject", protectedObject);
+            map.put("protectedInt", new Integer(protectedInt));
+            map.put("privateObject", privateObject);
+            map.put("privateInt", new Integer(privateInt));
+            map.put("nonObject", nonObject);
+            map.put("nonInt", new Integer(nonInt));
+            return map;
+        }
+    }
+    
+    protected static class StaticNested implements Job {
+        private Map map = new HashMap();
+        
+        public Map doSomething() {
+            map.put("static", new Boolean(true));
+            map.put("staticint", new Integer(staticint));
+            return map;
+        }
+    }
+    
+    protected class ConstructorNested implements Job {
+        Map map = new HashMap();
+        public ConstructorNested() {
+            map.put("publicObject", publicObject);
+            map.put("publicInt", new Integer(publicInt));
+            map.put("packageObject", packageObject);
+            map.put("packageInt", new Integer(packageInt));
+            map.put("protectedObject", protectedObject);
+            map.put("protectedInt", new Integer(protectedInt));
+            map.put("privateObject", privateObject);
+            map.put("privateInt", new Integer(privateInt));
+            map.put("nonObject", nonObject);
+            map.put("nonInt", new Integer(nonInt));
+        }
+        
+        public Map doSomething() {
+            return map;
+        }
+    }
+    
+
+}
+
+interface Job {
+    public Map doSomething();
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Invisible.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Invisible.java
new file mode 100644
index 0000000..125f408
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Invisible.java
@@ -0,0 +1,5 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+public @interface Invisible {
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Manipulation23Tester.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Manipulation23Tester.java
new file mode 100644
index 0000000..828645f
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Manipulation23Tester.java
@@ -0,0 +1,129 @@
+/* 
+ * 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.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.PrimitiveManipulationTestService;
+
+
+public class Manipulation23Tester implements PrimitiveManipulationTestService {
+	
+	// Integer types
+	byte b = 1;
+	short s = 1;
+	int i = 1;
+	long l = 1;
+	
+	// Floatting types
+	double d = 1.1;
+	float f = 1.1f;
+	
+	// Character
+	char c = 'a';
+	
+	// Boolean
+	boolean bool = false;
+	
+	// Integer arrays 
+	byte[] bs = new byte[] {0,1,2};
+	short[] ss = new short[] {0,1,2};
+	int[] is = new int[] {0,1,2};
+	long[] ls = new long[] {0,1,2};
+	
+	double[] ds = new double[] {0.0, 1.1, 2.2};
+	float[] fs = new float[] {0.0f, 1.1f, 2.2f};
+	
+	char[] cs = new char[] {'a', 'b', 'c'};
+	
+	boolean[] bools = new boolean[] {false, true, false};
+
+	public boolean getBoolean() { return bool; }
+
+	public boolean[] getBooleans() { return bools; }
+
+	public byte getByte() { return b; }
+
+	public byte[] getBytes() { return bs; }
+
+	public char getChar() { return c; }
+
+	public char[] getChars() { return cs; }
+
+	public double getDouble() { return d; }
+
+	public double[] getDoubles() { return ds; }
+
+	public float getFloat() { return f; }
+
+	public float[] getFloats() { return fs; }
+
+	public int getInt() { return i; }
+
+	public int[] getInts() { return is; }
+
+	public long getLong() { return l; }
+
+	public long[] getLongs() { return ls; }
+
+	public short getShort() { return s; }
+
+	public short[] getShorts() { return ss; }
+
+	public void setBoolean(boolean b) { this.bool = b; }
+
+	public void setBooleans(boolean[] bs) { this.bools = bs; }
+
+	public void setByte(byte b) { this.b = b; }
+
+	public void setBytes(byte[] bs) { this.bs = bs; }
+
+	public void setChar(char c) { this.c = c; }
+
+	public void setChars(char[] cs) { this.cs = cs; }
+
+	public void setDouble(double d) { this.d = d; }
+
+	public void setDoubles(double[] ds) { this.ds = ds; }
+
+	public void setFloat(float f) { this.f = f; }
+
+	public void setFloats(float[] fs) { this.fs = fs; }
+
+	public void setInt(int i) { this.i = i; }
+
+	public void setInts(int[] is) { this.is = is; }
+
+	public void setLong(long l) { this.l = l; }
+
+	public void setLongs(long[] ls) { this.ls = ls; }
+
+ 	public void setShort(short s) { this.s = s; }
+
+	public void setShorts(short[] ss) {
+	    this.ss = new short[ss.length];
+	    for (int i = 0; i < ss.length; i++) {
+	        this.ss[i] = ss[i];
+	    }
+	}
+	
+	// This method has been added to test an issue when autoboxing.
+	public void setLong(long l, String s) {
+	    this.l = l;
+	}
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Marker.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Marker.java
new file mode 100644
index 0000000..c6b4643
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/Marker.java
@@ -0,0 +1,21 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Marker {
+    
+    String name();
+    
+    String[] arrayOfObjects();
+    
+    SubMarker sub();
+    
+    SubMarker[] arrayOfAnnotations();
+    
+    Type type();
+    
+    public enum Type {FOO, BAR, BAZ};
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/PlopImpl.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/PlopImpl.java
new file mode 100644
index 0000000..4ce78b9
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/PlopImpl.java
@@ -0,0 +1,12 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.Plop;
+
+//TODO this test requires source compatibility 1.5
+public class PlopImpl implements Plop {
+
+    public String getPlop() {
+        return "plop";
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/SubMarker.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/SubMarker.java
new file mode 100644
index 0000000..0161a13
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/SubMarker.java
@@ -0,0 +1,12 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface SubMarker {
+    
+    String subname();
+
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/TestTypedList.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/TestTypedList.java
new file mode 100644
index 0000000..23c9bf1
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/TestTypedList.java
@@ -0,0 +1,32 @@
+package org.apache.felix.ipojo.runtime.core.components;
+
+import org.apache.felix.ipojo.runtime.core.services.CheckService;
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+
+import java.util.List;
+import java.util.Properties;
+
+public class TestTypedList implements CheckService {
+
+    private List<FooService> list;
+
+    public boolean check() {
+        return !list.isEmpty();
+    }
+
+    public Properties getProps() {
+        Properties props = new Properties();
+        if (list != null) {
+            props.put("list", list);
+
+            int i = 0;
+            for (FooService fs : list) {
+                props.put(i, fs.foo());
+                i++;
+            }
+        }
+
+        return props;
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/A123/CheckService2.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/A123/CheckService2.java
new file mode 100644
index 0000000..e31a24a
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/A123/CheckService2.java
@@ -0,0 +1,25 @@
+/* 
+ * 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.runtime.core.services.A123;
+
+public interface CheckService2 {
+	
+	public boolean check();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BarService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BarService.java
new file mode 100644
index 0000000..f704138
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BarService.java
@@ -0,0 +1,29 @@
+/* 
+ * 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.runtime.core.services;
+
+import java.util.Properties;
+
+public interface BarService {
+	
+	public boolean bar();
+	
+	public Properties getProps();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/CheckService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/CheckService.java
new file mode 100644
index 0000000..eca0faa
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/CheckService.java
@@ -0,0 +1,31 @@
+/* 
+ * 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.runtime.core.services;
+
+import java.util.Properties;
+
+public interface CheckService {
+    
+    public static final String foo = "foo";
+	
+	public boolean check();
+	
+	public Properties getProps();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java
new file mode 100644
index 0000000..37c1a65
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java
@@ -0,0 +1,39 @@
+/* 
+ * 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.runtime.core.services;
+
+import java.util.Properties;
+
+public interface FooService {
+
+	boolean foo();
+	
+	Properties fooProps();
+	
+	Boolean getObject();
+	
+	boolean getBoolean();
+	
+	int getInt();
+	
+	long getLong();
+	
+	double getDouble();
+	
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/Plop.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/Plop.java
new file mode 100644
index 0000000..bbe8a7e
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/Plop.java
@@ -0,0 +1,7 @@
+package org.apache.felix.ipojo.runtime.core.services;
+
+public interface Plop {
+    
+   Object getPlop();
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/PrimitiveManipulationTestService.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/PrimitiveManipulationTestService.java
new file mode 100644
index 0000000..10a6288
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/PrimitiveManipulationTestService.java
@@ -0,0 +1,75 @@
+/* 
+ * 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.runtime.core.services;
+
+public interface PrimitiveManipulationTestService {
+	
+	byte getByte();
+	void setByte(byte b);
+	
+	short getShort();
+	void setShort(short s);
+	
+	int getInt();
+	void setInt(int i);
+	
+	long getLong();
+	void setLong(long l);
+	
+	float getFloat();
+	void setFloat(float f);
+	
+	double getDouble();
+	void setDouble(double d);
+	
+	char getChar();
+	void setChar(char c);
+	
+	boolean getBoolean();
+	void setBoolean(boolean b);
+	
+	// Array types
+	byte[] getBytes();
+	void setBytes(byte[] bs);
+	
+	short[] getShorts();
+	void setShorts(short[] ss);
+	
+	int[] getInts();
+	void setInts(int is[]);
+	
+	long[] getLongs();
+	void setLongs(long[] ls);
+	
+	float[] getFloats();
+	void setFloats(float[] fs);
+	
+	double[] getDoubles();
+	void setDoubles(double[] ds);
+	
+	char[] getChars();
+	void setChars(char[] cs);
+	
+	boolean[] getBooleans();
+	void setBooleans(boolean[] bs);	
+	
+	// This method has been added to test an issue when autoboxing.
+	void setLong(long l, String s);
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/resources/metadata-java5.xml b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/resources/metadata-java5.xml
new file mode 100644
index 0000000..d2f027d
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/resources/metadata-java5.xml
@@ -0,0 +1,31 @@
+<ipojo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/SNAPSHOT/core.xsd"
+	xmlns="org.apache.felix.ipojo">
+	
+	<!-- Check duplicate method issue -->
+	<component classname="org.apache.felix.ipojo.runtime.core.components.PlopImpl"
+		name="plopimpl">
+		<provides></provides>
+	</component>
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.Manipulation23Tester"
+		name="ManipulationPrimitives5-PrimitiveManipulationTester"
+		architecture="true">
+		<provides />
+	</component>
+	<component classname="org.apache.felix.ipojo.runtime.core.components.Annotation"
+		name="Manipulation-Annotations" />
+	    
+	    
+	 <!-- Typed list -->
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.FooServiceImpl">
+		<provides />
+	</component>
+	<component 
+	    classname="org.apache.felix.ipojo.runtime.core.components.TestTypedList" name="TypedList">
+	    <provides/>
+	    <requires field="list" optional="true"
+                  specification="org.apache.felix.ipojo.runtime.core.services.FooService"/>
+	</component>
+</ipojo>
\ No newline at end of file
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/resources/metadata-primitives.xml b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/resources/metadata-primitives.xml
new file mode 100644
index 0000000..6bc2094
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/resources/metadata-primitives.xml
@@ -0,0 +1,22 @@
+<ipojo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/SNAPSHOT/core.xsd"
+    xmlns="org.apache.felix.ipojo"
+>
+	
+	<!-- Manipulation -->
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.Manipulation23Tester"
+		name="ManipulationPrimitives-PrimitiveManipulationTester" architecture="true">
+		<provides />
+	</component>
+
+	<!-- Manipulation with numbers -->
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.A123.Manipulation23Tester"
+		name="ManipulationPrimitives-PrimitiveManipulationTesterA" architecture="true">
+		<provides />
+	</component>
+	
+
+</ipojo>
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/resources/metadata.xml b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/resources/metadata.xml
new file mode 100644
index 0000000..7650c4f
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/main/resources/metadata.xml
@@ -0,0 +1,37 @@
+<ipojo
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="org.apache.felix.ipojo http://felix.apache.org/ipojo/schemas/SNAPSHOT/core.xsd"
+    xmlns="org.apache.felix.ipojo"
+>
+	<!-- Simple provider  used for manipulation analysis -->
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.FooProviderType1"
+		name="Manipulation-FooProviderType-1" architecture="true">
+		<provides />
+	</component>
+	
+	<!-- Non lazzy service provider, to check instantiation -->
+	<component
+		classname="org.apache.felix.ipojo.runtime.core.components.FooProviderType1"
+		name="Manipulation-ImmediateFooProviderType" immediate="true"
+		architecture="true">
+		<provides />
+	</component>
+	
+	<!-- Nested & Inner classes -->
+	<component name="inners" classname="org.apache.felix.ipojo.runtime.core.components.InnerClasses">
+		<provides>
+			<property field="privateObject"/>
+			<property field="privateInt"/>
+			
+			<property field="protectedObject"/>
+			<property field="protectedInt"/>
+			
+			<property field="packageObject"/>
+			<property field="packageInt"/>
+			
+			<property field="publicObject"/>
+			<property field="publicInt"/>
+		</provides>
+	</component>
+</ipojo>
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java
new file mode 100644
index 0000000..509721c
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/Common.java
@@ -0,0 +1,198 @@
+package org.apache.felix.ipojo.runtime.core;
+
+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.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.PerClass;
+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.BundleContext;
+import org.osgi.framework.Constants;
+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
+    BundleContext bc;
+
+    OSGiHelper osgiHelper;
+    IPOJOHelper ipojoHelper;
+
+    @Configuration
+    public Option[] config() throws IOException {
+        Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
+        root.setLevel(Level.INFO);
+
+        return options(
+                ipojoBundles(),
+                junitBundles(),
+                testedBundle(),
+                systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("WARN")
+        );
+    }
+
+    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")
+        );
+    }
+
+
+    @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);
+    }
+
+    @After
+    public void commonTearDown() {
+        ipojoHelper.dispose();
+        osgiHelper.dispose();
+    }
+
+    public CompositeOption ipojoBundles() {
+        return new DefaultCompositeOption(
+                mavenBundle("org.apache.felix", "org.apache.felix.ipojo").versionAsInProject(),
+                mavenBundle("org.ow2.chameleon.testing", "osgi-helpers").versionAsInProject(),
+                // harmcrest-all
+                //mavenBundle("de.twentyeleven.skysail", "org.hamcrest.hamcrest-all-osgi").versionAsInProject(),
+                // configuration admin
+                mavenBundle("org.apache.felix",  "org.apache.felix.configadmin").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.getAbsolutePath().contains("/services")  || file.getAbsolutePath().contains("/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);
+            }
+        }
+
+        // We export components.
+        String export = "org.apache.felix.ipojo.runtime.core.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);
+    }
+
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestAnnotationProcessing.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestAnnotationProcessing.java
new file mode 100644
index 0000000..dab6b00
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestAnnotationProcessing.java
@@ -0,0 +1,168 @@
+package org.apache.felix.ipojo.runtime.core;
+
+import org.apache.felix.ipojo.runtime.core.components.Marker;
+import org.apache.felix.ipojo.runtime.core.components.SubMarker;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+public class TestAnnotationProcessing extends Common {
+
+    private Class clazz;
+
+    @Before
+    public void setUp() {
+        try {
+            clazz = bc.getBundle().
+                    loadClass("org.apache.felix.ipojo.runtime.core.components.Annotation");
+        } catch (ClassNotFoundException e) {
+            fail("Cannot load the annotation class : " + e.getMessage());
+        }
+    }
+
+
+    @Test
+    public void testAnnotationOnMethod() {
+        Method method = null;
+        try {
+            method = this.clazz.getMethod("doSomething", new Class[0]);
+        } catch (Exception e) {
+            fail("Cannot find the doSomething method : " + e.getMessage());
+        }
+        assertNotNull("Check method existence", method);
+
+        java.lang.annotation.Annotation[] annotations = method.getDeclaredAnnotations();
+        assertNotNull("Check annotations size - 1", annotations);
+        assertEquals("Check annotations size - 2", 2, annotations.length); // Invisible is not visible
+        
+        /*
+            @Marker(name="marker", type=Type.BAR, 
+            sub=@SubMarker(subname="foo"),
+            arrayOfObjects={"foo", "bar", "baz"},
+            arrayOfAnnotations= {@SubMarker(subname="foo")}
+            )
+            @SubMarker(subname="bar")
+            @Invisible
+         */
+
+        Marker marker = getMarkerAnnotation(annotations);
+        assertNotNull("Check marker", marker);
+
+        assertEquals("Check marker name", "marker", marker.name());
+        assertEquals("Check marker type", Marker.Type.BAR, marker.type());
+        assertEquals("Check sub marker attribute", "foo", marker.sub().subname());
+        assertEquals("Check objects [0]", "foo", marker.arrayOfObjects()[0]);
+        assertEquals("Check objects [1]", "bar", marker.arrayOfObjects()[1]);
+        assertEquals("Check objects [2]", "baz", marker.arrayOfObjects()[2]);
+        assertEquals("Check annotations[0]", "foo", marker.arrayOfAnnotations()[0].subname());
+
+        SubMarker sub = getSubMarkerAnnotation(annotations);
+        assertNotNull("Check submarker", sub);
+        assertEquals("Check submarker", "bar", sub.subname());
+
+    }
+
+    @Test
+    public void testAnnotationOnConstructor() {
+        Constructor method = null;
+        try {
+            method = clazz.getConstructor(new Class[0]);
+        } catch (Exception e) {
+            fail("Cannot find the constructor method : " + e.getMessage());
+        }
+        assertNotNull("Check method existence", method);
+
+        java.lang.annotation.Annotation[] annotations = method.getDeclaredAnnotations();
+        assertNotNull("Check annotations size - 1", annotations);
+        assertEquals("Check annotations size - 2", 2, annotations.length); // Invisible is not visible
+        
+        /*
+            @Marker(name="marker", type=Type.BAR, 
+            sub=@SubMarker(subname="foo"),
+            arrayOfObjects={"foo", "bar", "baz"},
+            arrayOfAnnotations= {@SubMarker(subname="foo")}
+            )
+            @SubMarker(subname="bar")
+            @Invisible
+         */
+
+        Marker marker = getMarkerAnnotation(annotations);
+        assertNotNull("Check marker", marker);
+
+        assertEquals("Check marker name", "marker", marker.name());
+        assertEquals("Check marker type", Marker.Type.BAR, marker.type());
+        assertEquals("Check sub marker attribute", "foo", marker.sub().subname());
+        assertEquals("Check objects [0]", "foo", marker.arrayOfObjects()[0]);
+        assertEquals("Check objects [1]", "bar", marker.arrayOfObjects()[1]);
+        assertEquals("Check objects [2]", "baz", marker.arrayOfObjects()[2]);
+        assertEquals("Check annotations[0]", "foo", marker.arrayOfAnnotations()[0].subname());
+
+        SubMarker sub = getSubMarkerAnnotation(annotations);
+        assertNotNull("Check submarker", sub);
+        assertEquals("Check submarker", "bar", sub.subname());
+    }
+
+    @Test
+    public void testParameterAnnotations() {
+        Method method = null;
+        try {
+            method = this.clazz.getMethod("doSomethingWithParams", new Class[]{String.class, String.class, String.class});
+        } catch (Exception e) {
+            fail("Cannot find the doSomethingWithParams method : " + e.getMessage());
+        }
+        assertNotNull("Check method existence", method);
+
+        java.lang.annotation.Annotation[][] annotations = method.getParameterAnnotations();
+        assertNotNull("Check annotations size - 1", annotations);
+        assertEquals("Check annotations size - 3", 3, annotations.length);
+
+        // Check internals
+        // First parameter (foo)
+        java.lang.annotation.Annotation[] fooAnns = annotations[0];
+        assertEquals("Check fooAnns length", 1, fooAnns.length);
+        Marker marker = (Marker) fooAnns[0];
+        assertNotNull("Check marker", marker);
+        assertEquals("Check marker name", "marker", marker.name());
+        assertEquals("Check marker type", Marker.Type.BAR, marker.type());
+        assertEquals("Check sub marker attribute", "foo", marker.sub().subname());
+        assertEquals("Check objects [0]", "foo", marker.arrayOfObjects()[0]);
+        assertEquals("Check objects [1]", "bar", marker.arrayOfObjects()[1]);
+        assertEquals("Check objects [2]", "baz", marker.arrayOfObjects()[2]);
+        assertEquals("Check annotations[0]", "foo", marker.arrayOfAnnotations()[0].subname());
+
+        // Second parameter (bar), no annotation (invisible)
+        java.lang.annotation.Annotation[] barAnns = annotations[1];
+        assertEquals("Check barAnns length", 0, barAnns.length);
+
+        // Third parameter (baz), two annotations
+        java.lang.annotation.Annotation[] bazAnns = annotations[2];
+        System.out.println(Arrays.toString(bazAnns));
+        assertEquals("Check bazAnns length", 2, bazAnns.length);
+    }
+
+    private Marker getMarkerAnnotation(java.lang.annotation.Annotation[] annotations) {
+        for (int i = 0; i < annotations.length; i++) {
+            if (annotations[i].annotationType().getName().equals("org.apache.felix.ipojo.runtime.core.components.Marker")) {
+                return (Marker) annotations[i];
+            }
+        }
+        return null;
+    }
+
+    private SubMarker getSubMarkerAnnotation(java.lang.annotation.Annotation[] annotations) {
+        for (int i = 0; i < annotations.length; i++) {
+            if (annotations[i].annotationType().getName().equals("org.apache.felix.ipojo.runtime.core.components.SubMarker")) {
+                return (SubMarker) annotations[i];
+            }
+        }
+        return null;
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDuplicateMethods.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDuplicateMethods.java
new file mode 100644
index 0000000..74dcfa2
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDuplicateMethods.java
@@ -0,0 +1,23 @@
+package org.apache.felix.ipojo.runtime.core;
+
+import org.apache.felix.ipojo.runtime.core.services.Plop;
+import org.junit.Test;
+import org.osgi.framework.ServiceReference;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class TestDuplicateMethods extends Common {
+
+
+    @Test
+    public void testDuplicateMethod() {
+        ipojoHelper.createComponentInstance("plopimpl", "plop");
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(Plop.class.getName(), "plop");
+        assertNotNull("Check plop", ref);
+        Plop plop = (Plop) osgiHelper.getServiceObject(ref);
+        Object o = plop.getPlop();
+        assertEquals("Check result", "plop", o);
+        ipojoHelper.dispose();
+    }
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestExceptionHandling.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestExceptionHandling.java
new file mode 100644
index 0000000..064b19d
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestExceptionHandling.java
@@ -0,0 +1,90 @@
+/* 
+ * 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.runtime.core;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.architecture.Architecture;
+import org.apache.felix.ipojo.runtime.core.components.FooProviderType1;
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.ServiceReference;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+/**
+ * Test exception handling. POJO exception must be propagated.
+ */
+public class TestExceptionHandling extends Common {
+
+    private ComponentInstance ci_lazzy;
+
+    private ServiceReference lazzyRef;
+    private ServiceReference immRef;
+
+    @Before
+    public void setUp() {
+        String factName = "Manipulation-FooProviderType-1";
+        String compName = "FooProvider-1";
+        ci_lazzy = ipojoHelper.createComponentInstance(factName, compName);
+
+        String factName2 = "Manipulation-ImmediateFooProviderType";
+        String compName2 = "FooProvider-2";
+        ipojoHelper.createComponentInstance(factName2, compName2);
+
+        lazzyRef = osgiHelper.getServiceReference(Architecture.class.getName(), "(architecture.instance=" + compName + ")");
+        immRef = osgiHelper.getServiceReference(Architecture.class.getName(), "(architecture.instance=" + compName2 + ")");
+
+        assertNotNull("LazzyRef", lazzyRef);
+        assertNotNull("ImmRef", immRef);
+    }
+
+    /**
+     * Check that the exception is correctly propagated.
+     */
+    @Test
+    public void testException() {
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_lazzy.getInstanceName());
+        assertNotNull("Check that a FooService from " + ci_lazzy.getInstanceName() + " is available", ref);
+        FooProviderType1 fs = (FooProviderType1) osgiHelper.getServiceObject(ref);
+        try {
+            fs.testException();
+            fail("The method must returns an exception");
+        } catch (Exception e) {
+            // OK
+        }
+    }
+
+    /**
+     * Check that the exception is correctly catch by the POJO.
+     */
+    @Test
+    public void testTry() {
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), ci_lazzy.getInstanceName());
+        assertNotNull("Check that a FooService from " + ci_lazzy.getInstanceName() + " is available", ref);
+        FooProviderType1 fs = (FooProviderType1) osgiHelper.getServiceObject(ref);
+        try {
+            fs.testTry();
+        } catch (Exception e) {
+            fail("The method has returned an exception");
+        }
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGenericList.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGenericList.java
new file mode 100644
index 0000000..7210ef3
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGenericList.java
@@ -0,0 +1,60 @@
+package org.apache.felix.ipojo.runtime.core;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.runtime.core.services.CheckService;
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.ServiceReference;
+
+import java.util.List;
+import java.util.Properties;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.*;
+
+public class TestGenericList extends Common {
+
+    ComponentInstance foo1, foo2;
+    ComponentInstance checker;
+
+    @Before
+    public void setUp() {
+        foo1 = ipojoHelper.createComponentInstance("org.apache.felix.ipojo.runtime.core.components.FooServiceImpl", "foo1");
+        foo2 = ipojoHelper.createComponentInstance("org.apache.felix.ipojo.runtime.core.components.FooServiceImpl", "foo2");
+        checker = ipojoHelper.createComponentInstance("TypedList", "checker");
+        foo1.stop();
+        foo2.stop();
+    }
+
+    @Test
+    public void testTypedList() {
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), checker.getInstanceName());
+        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        assertNotNull("Checker availability", check);
+        // Check without providers
+        assertFalse("Empty list", check.check());
+
+        // Start the first provider
+        foo1.start();
+        assertTrue("List with one element", check.check());
+        Properties props = check.getProps();
+        List<FooService> list = (List<FooService>) props.get("list");
+        assertEquals("Check size - 1", 1, list.size());
+
+        // Start the second provider 
+        foo2.start();
+        assertTrue("List with two element", check.check());
+        props = check.getProps();
+        list = (List<FooService>) props.get("list");
+        assertEquals("Check size - 2", 2, list.size());
+
+        // Stop the first one
+        foo1.stop();
+        assertTrue("List with one element (2)", check.check());
+        props = check.getProps();
+        list = (List<FooService>) props.get("list");
+        assertEquals("Check size - 3", 1, list.size());
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java
new file mode 100644
index 0000000..297a3e6
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java
@@ -0,0 +1,92 @@
+/* 
+ * 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.runtime.core;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.Factory;
+import org.apache.felix.ipojo.Pojo;
+import org.apache.felix.ipojo.PrimitiveInstanceDescription;
+import org.apache.felix.ipojo.runtime.core.services.FooService;
+import org.junit.Test;
+import org.osgi.framework.ServiceReference;
+
+import java.util.Properties;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.*;
+
+/**
+ * Check the getComponentInstance method on a POJO
+ */
+public class TestGetComponentInstance extends Common {
+
+    /**
+     * Check if a pojo can correctly be cast in POJO.
+     * Check the getComponentInstance method.
+     */
+    @Test
+    public void testGetComponentInstance() {
+        String factName = "Manipulation-FooProviderType-1";
+        String compName = "FooProvider-1";
+        ServiceReference ref = null;
+
+        // Get the factory to create a component instance
+        Factory fact = ipojoHelper.getFactory(factName);
+        assertNotNull("Cannot find the factory FooProvider-1", fact);
+
+        Properties props = new Properties();
+        props.put("instance.name", compName);
+        ComponentInstance ci = null;
+        try {
+            ci = fact.createComponentInstance(props);
+        } catch (Exception e1) {
+            fail(e1.getMessage());
+        }
+
+        assertEquals("Check instance name", compName, ci.getInstanceName());
+
+        // Get a FooService provider
+        ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), compName);
+
+        assertNotNull("FS not available", ref);
+
+        // Get foo object
+        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+
+        // Cast to POJO
+        Pojo pojo = (Pojo) fs;
+
+        // GetComponentInstance
+        ComponentInstance instance = pojo.getComponentInstance();
+        assertEquals("Check component instance name", instance.getInstanceName(), compName);
+        assertEquals("Check component factory name", instance.getFactory().getName(), factName);
+        assertNotNull("Instance description not null", instance.getInstanceDescription());
+        PrimitiveInstanceDescription id = (PrimitiveInstanceDescription) instance.getInstanceDescription();
+        assertTrue("Check instance state", id.getState() == ComponentInstance.VALID);
+        assertEquals("Check created pojo count", id.getCreatedObjects().length, 1);
+        assertEquals("Check instance description name", id.getName(), compName);
+
+        ci.dispose();
+
+        // Check that there is no more FooService
+        ref = osgiHelper.getServiceReference(FooService.class.getName());
+        assertNull("FS available, but component instance stopped", ref);
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestNestedClasses.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestNestedClasses.java
new file mode 100644
index 0000000..0baa6a7
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestNestedClasses.java
@@ -0,0 +1,186 @@
+package org.apache.felix.ipojo.runtime.core;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.runtime.core.components.InnerClasses;
+import org.apache.felix.ipojo.runtime.core.services.CheckService;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.ServiceReference;
+
+import java.util.Map;
+import java.util.Properties;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class TestNestedClasses extends Common {
+
+    private ComponentInstance instance;
+    private CheckService service;
+
+    @Before
+    public void setUp() {
+        Properties map = new Properties();
+        map.put("publicObject", "publicObject");
+        map.put("publicInt", new Integer(0));
+        map.put("packageObject", "packageObject");
+        map.put("packageInt", new Integer(1));
+        map.put("protectedObject", "protectedObject");
+        map.put("protectedInt", new Integer(2));
+        map.put("privateObject", "privateObject");
+        map.put("privateInt", new Integer(3));
+        map.put("nonObject", "nonObject");
+        map.put("nonInt", new Integer(4));
+        instance = ipojoHelper.createComponentInstance("inners", map);
+
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
+        assertNotNull("Check service availability", ref);
+        service = (CheckService) osgiHelper.getServiceObject(ref);
+    }
+
+    @After
+    public void tearDown() {
+        service = null;
+    }
+
+    @Test
+    public void testPrivateInnerClass() {
+        Map data = (Map) service.getProps().get("privateInner");
+        assertNotNull("Check data existence", data);
+
+        assertEquals("Check public object", "publicObject", data.get("publicObject"));
+        assertEquals("Check public int", new Integer(0), data.get("publicInt"));
+        assertEquals("Check protected object", "protectedObject", data.get("protectedObject"));
+        assertEquals("Check protected int", new Integer(2), data.get("protectedInt"));
+        assertEquals("Check package object", "packageObject", data.get("packageObject"));
+        assertEquals("Check package int", new Integer(1), data.get("packageInt"));
+        assertEquals("Check private object", "privateObject", data.get("privateObject"));
+        assertEquals("Check private int", new Integer(3), data.get("privateInt"));
+        assertEquals("Check non-managed object", "not-managed", data.get("nonObject"));
+        assertEquals("Check non-managed int", new Integer(5), data.get("nonInt"));
+
+    }
+
+    @Test
+    public void testProtectedInnerClass() {
+        Map data = (Map) service.getProps().get("protectedInner");
+        assertNotNull("Check data existence", data);
+
+        assertEquals("Check public object", "publicObject", data.get("publicObject"));
+        assertEquals("Check public int", new Integer(0), data.get("publicInt"));
+        assertEquals("Check protected object", "protectedObject", data.get("protectedObject"));
+        assertEquals("Check protected int", new Integer(2), data.get("protectedInt"));
+        assertEquals("Check package object", "packageObject", data.get("packageObject"));
+        assertEquals("Check package int", new Integer(1), data.get("packageInt"));
+        assertEquals("Check private object", "privateObject", data.get("privateObject"));
+        assertEquals("Check private int", new Integer(3), data.get("privateInt"));
+        assertEquals("Check non-managed object", "not-managed", data.get("nonObject"));
+        assertEquals("Check non-managed int", new Integer(5), data.get("nonInt"));
+
+    }
+
+    @Test
+    public void testPackageInnerClass() {
+        Map data = (Map) service.getProps().get("packageInner");
+        assertNotNull("Check data existence", data);
+
+        assertEquals("Check public object", "publicObject", data.get("publicObject"));
+        assertEquals("Check public int", new Integer(0), data.get("publicInt"));
+        assertEquals("Check protected object", "protectedObject", data.get("protectedObject"));
+        assertEquals("Check protected int", new Integer(2), data.get("protectedInt"));
+        assertEquals("Check package object", "packageObject", data.get("packageObject"));
+        assertEquals("Check package int", new Integer(1), data.get("packageInt"));
+        assertEquals("Check private object", "privateObject", data.get("privateObject"));
+        assertEquals("Check private int", new Integer(3), data.get("privateInt"));
+        assertEquals("Check non-managed object", "not-managed", data.get("nonObject"));
+        assertEquals("Check non-managed int", new Integer(5), data.get("nonInt"));
+
+    }
+
+    @Test
+    public void testPublicInnerClass() {
+        Map data = (Map) service.getProps().get("publicInner");
+        assertNotNull("Check data existence", data);
+
+        assertEquals("Check public object", "publicObject", data.get("publicObject"));
+        assertEquals("Check public int", new Integer(0), data.get("publicInt"));
+        assertEquals("Check protected object", "protectedObject", data.get("protectedObject"));
+        assertEquals("Check protected int", new Integer(2), data.get("protectedInt"));
+        assertEquals("Check package object", "packageObject", data.get("packageObject"));
+        assertEquals("Check package int", new Integer(1), data.get("packageInt"));
+        assertEquals("Check private object", "privateObject", data.get("privateObject"));
+        assertEquals("Check private int", new Integer(3), data.get("privateInt"));
+        assertEquals("Check non-managed object", "not-managed", data.get("nonObject"));
+        assertEquals("Check non-managed int", new Integer(5), data.get("nonInt"));
+
+    }
+
+    @Test
+    public void testConstructorInnerClass() {
+        Map data = (Map) service.getProps().get("constructorInner");
+        assertNotNull("Check data existence", data);
+
+        assertEquals("Check public object", "publicObject", data.get("publicObject"));
+        assertEquals("Check public int", new Integer(0), data.get("publicInt"));
+        assertEquals("Check protected object", "protectedObject", data.get("protectedObject"));
+        assertEquals("Check protected int", new Integer(2), data.get("protectedInt"));
+        assertEquals("Check package object", "packageObject", data.get("packageObject"));
+        assertEquals("Check package int", new Integer(1), data.get("packageInt"));
+        assertEquals("Check private object", "privateObject", data.get("privateObject"));
+        assertEquals("Check private int", new Integer(3), data.get("privateInt"));
+        assertEquals("Check non-managed object", "not-managed", data.get("nonObject"));
+        assertEquals("Check non-managed int", new Integer(5), data.get("nonInt"));
+
+    }
+
+    @Test
+    public void testStaticInnerClass() {
+        Map data = (Map) service.getProps().get("staticInner");
+        assertNotNull("Check data existence", data);
+
+        assertEquals("Check static", new Boolean(true), data.get("static"));
+        assertEquals("Check static int", new Integer(6), data.get("staticint"));
+
+    }
+
+    @Test
+    public void testAnonymousInnerClass() {
+        Map data = (Map) service.getProps().get("anonymous");
+        assertNotNull("Check data existence", data);
+
+        assertEquals("Check public object", "publicObject", data.get("publicObject"));
+        assertEquals("Check public int", new Integer(0), data.get("publicInt"));
+        assertEquals("Check protected object", "protectedObject", data.get("protectedObject"));
+        assertEquals("Check protected int", new Integer(2), data.get("protectedInt"));
+        assertEquals("Check package object", "packageObject", data.get("packageObject"));
+        assertEquals("Check package int", new Integer(1), data.get("packageInt"));
+        assertEquals("Check private object", "privateObject", data.get("privateObject"));
+        assertEquals("Check private int", new Integer(3), data.get("privateInt"));
+        assertEquals("Check non-managed object", "not-managed", data.get("nonObject"));
+        assertEquals("Check non-managed int", new Integer(5), data.get("nonInt"));
+
+    }
+
+    @Test
+    public void testInnerAccess() {
+        Map map = (Map) service.getProps();
+        assertNotNull("Check map existence", map);
+
+        InnerClasses.PublicNested p = (InnerClasses.PublicNested) map.get("public");
+        Map data = p.doSomething();
+
+        assertEquals("Check public object", "publicObject", data.get("publicObject"));
+        assertEquals("Check public int", new Integer(0), data.get("publicInt"));
+        assertEquals("Check protected object", "protectedObject", data.get("protectedObject"));
+        assertEquals("Check protected int", new Integer(2), data.get("protectedInt"));
+        assertEquals("Check package object", "packageObject", data.get("packageObject"));
+        assertEquals("Check package int", new Integer(1), data.get("packageInt"));
+        assertEquals("Check private object", "privateObject", data.get("privateObject"));
+        assertEquals("Check private int", new Integer(3), data.get("privateInt"));
+        assertEquals("Check non-managed object", "not-managed", data.get("nonObject"));
+        assertEquals("Check non-managed int", new Integer(5), data.get("nonInt"));
+
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPrimitiveTypes.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPrimitiveTypes.java
new file mode 100644
index 0000000..303175c
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPrimitiveTypes.java
@@ -0,0 +1,107 @@
+/* 
+ * 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.runtime.core;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.runtime.core.services.PrimitiveManipulationTestService;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.*;
+
+/**
+ * Check the manipulation of primitive type (boxed and unboxed).
+ */
+public class TestPrimitiveTypes extends Common {
+
+    PrimitiveManipulationTestService prim;
+
+    @Before
+    public void setUp() {
+        ComponentInstance instance = ipojoHelper.createComponentInstance("ManipulationPrimitives-PrimitiveManipulationTester");
+        assertTrue("check instance state", instance.getState() == ComponentInstance.VALID);
+        prim = (PrimitiveManipulationTestService) osgiHelper.getServiceObject(PrimitiveManipulationTestService.class.getName(), "(instance.name=" + instance.getInstanceName() + ")");
+        assertNotNull("Check prim availability", prim);
+    }
+
+    @After
+    public void tearDown() {
+        prim = null;
+    }
+
+    @Test
+    public void testByte() {
+        assertEquals("Check - 1", prim.getByte(), 1);
+        prim.setByte((byte) 2);
+        assertEquals("Check - 2", prim.getByte(), 2);
+    }
+
+    @Test
+    public void testShort() {
+        assertEquals("Check - 1", prim.getShort(), 1);
+        prim.setShort((short) 2);
+        assertEquals("Check - 2", prim.getShort(), 2);
+    }
+
+    @Test
+    public void testInt() {
+        assertEquals("Check - 1", prim.getInt(), 1);
+        prim.setInt((int) 2);
+        assertEquals("Check - 2", prim.getInt(), 2);
+    }
+
+    @Test
+    public void testLong() {
+        assertEquals("Check - 1", prim.getLong(), 1);
+        prim.setLong((long) 2);
+        assertEquals("Check - 2", prim.getLong(), 2);
+    }
+
+    @Test
+    public void testFloat() {
+        assertEquals("Check - 1", prim.getFloat(), 1.1f);
+        prim.setFloat(2.2f);
+        assertEquals("Check - 2", prim.getFloat(), 2.2f);
+    }
+
+    @Test
+    public void testDouble() {
+        assertEquals("Check - 1", prim.getDouble(), 1.1);
+        prim.setDouble(2.2);
+        assertEquals("Check - 2", prim.getDouble(), 2.2);
+    }
+
+    @Test
+    public void testBoolean() {
+        assertFalse("Check - 1", prim.getBoolean());
+        prim.setBoolean(true);
+        assertTrue("Check - 2", prim.getBoolean());
+    }
+
+    @Test
+    public void testChar() {
+        assertEquals("Check - 1", prim.getChar(), 'a');
+        prim.setChar('b');
+        assertEquals("Check - 2", prim.getChar(), 'b');
+    }
+
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPrimitiveTypesWithNumberInNames.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPrimitiveTypesWithNumberInNames.java
new file mode 100644
index 0000000..709cbbe
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPrimitiveTypesWithNumberInNames.java
@@ -0,0 +1,111 @@
+/* 
+ * 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.runtime.core;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.runtime.core.services.PrimitiveManipulationTestService;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.ServiceReference;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.*;
+
+/**
+ * Check the manipulation of primitive type (boxed and unboxed).
+ * The targeted implementation contains numbers in the package and class name.
+ */
+public class TestPrimitiveTypesWithNumberInNames extends Common {
+
+    PrimitiveManipulationTestService prim;
+
+    @Before
+    public void setUp() {
+        ComponentInstance instance =
+                ipojoHelper.createComponentInstance("ManipulationPrimitives-PrimitiveManipulationTesterA");
+        assertTrue("check instance state", instance.getState() == ComponentInstance.VALID);
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(PrimitiveManipulationTestService.class.getName(),
+                instance.getInstanceName());
+        assertNotNull("Check prim availability", ref);
+        prim = (PrimitiveManipulationTestService) osgiHelper.getServiceObject(ref);
+    }
+
+    @After
+    public void tearDown() {
+        prim = null;
+    }
+
+    @Test
+    public void testByte() {
+        assertEquals("Check - 1", prim.getByte(), 1);
+        prim.setByte((byte) 2);
+        assertEquals("Check - 2", prim.getByte(), 2);
+    }
+
+    @Test
+    public void testShort() {
+        assertEquals("Check - 1", prim.getShort(), 1);
+        prim.setShort((short) 2);
+        assertEquals("Check - 2", prim.getShort(), 2);
+    }
+
+    @Test
+    public void testInt() {
+        assertEquals("Check - 1", prim.getInt(), 1);
+        prim.setInt((int) 2);
+        assertEquals("Check - 2", prim.getInt(), 2);
+    }
+
+    @Test
+    public void testLong() {
+        assertEquals("Check - 1", prim.getLong(), 1);
+        prim.setLong((long) 2);
+        assertEquals("Check - 2", prim.getLong(), 2);
+    }
+
+    @Test
+    public void testFloat() {
+        assertEquals("Check - 1", prim.getFloat(), 1.1f);
+        prim.setFloat(2.2f);
+        assertEquals("Check - 2", prim.getFloat(), 2.2f);
+    }
+
+    @Test
+    public void testDouble() {
+        assertEquals("Check - 1", prim.getDouble(), 1.1);
+        prim.setDouble(2.2);
+        assertEquals("Check - 2", prim.getDouble(), 2.2);
+    }
+
+    @Test
+    public void testBoolean() {
+        assertFalse("Check - 1", prim.getBoolean());
+        prim.setBoolean(true);
+        assertTrue("Check - 2", prim.getBoolean());
+    }
+
+    @Test
+    public void testChar() {
+        assertEquals("Check - 1", prim.getChar(), 'a');
+        prim.setChar('b');
+        assertEquals("Check - 2", prim.getChar(), 'b');
+    }
+
+}
diff --git a/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestTypeBoxing.java b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestTypeBoxing.java
new file mode 100644
index 0000000..e05108c
--- /dev/null
+++ b/ipojo/manipulator/manipulator-it/src/it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestTypeBoxing.java
@@ -0,0 +1,57 @@
+package org.apache.felix.ipojo.runtime.core;
+
+import org.apache.felix.ipojo.ComponentInstance;
+import org.apache.felix.ipojo.runtime.core.services.PrimitiveManipulationTestService;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.ServiceReference;
+
+import java.util.Properties;
+
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+public class TestTypeBoxing extends Common {
+
+    ComponentInstance instance; // Instance under test
+
+    PrimitiveManipulationTestService prim;
+
+    ServiceReference prim_ref;
+
+    @Before
+    public void setUp() {
+        Properties p1 = new Properties();
+        p1.put("instance.name", "primitives");
+        instance = ipojoHelper.createComponentInstance("ManipulationPrimitives5-PrimitiveManipulationTester", p1);
+        assertTrue("check instance state", instance.getState() == ComponentInstance.VALID);
+        prim_ref = ipojoHelper.getServiceReferenceByName(PrimitiveManipulationTestService.class.getName(), instance.getInstanceName());
+        assertNotNull("Check prim availability", prim_ref);
+        prim = (PrimitiveManipulationTestService) osgiHelper.getServiceObject(prim_ref);
+    }
+
+    @After
+    public void tearDown() {
+        prim = null;
+    }
+
+
+    @Test
+    public void testLongFromObject() {
+        assertEquals("Check - 1", prim.getLong(), 1);
+        Long l = new Long(2);
+        prim.setLong(l);
+        assertEquals("Check - 2", prim.getLong(), 2);
+    }
+
+    @Test
+    public void testLongFromObject2() {
+        assertEquals("Check - 1", prim.getLong(), 1);
+        Long l = new Long(2);
+        prim.setLong(l, "ss");
+        assertEquals("Check - 2", prim.getLong(), 2);
+    }
+
+}
