Split the iPOJO test suite in several bundles.


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@651646 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/tests/tests.composite/pom.xml b/ipojo/tests/tests.composite/pom.xml
index 3a2ffeb..9162a38 100644
--- a/ipojo/tests/tests.composite/pom.xml
+++ b/ipojo/tests/tests.composite/pom.xml
@@ -54,11 +54,6 @@
 			<artifactId>org.apache.felix.ipojo.junit4osgi</artifactId>

 			<version>0.7.6-SNAPSHOT</version>

 		</dependency>

-		<dependency>

-			<groupId>ipojo.tests</groupId>

-			<artifactId>tests.core</artifactId>

-			<version>0.7.6-SNAPSHOT</version>

-		</dependency>

 	</dependencies>

 	<build>

 		<plugins>

@@ -81,9 +76,6 @@
 						<Test-Suite>

 							org.apache.felix.ipojo.test.composite.CompositeTestSuite

 						</Test-Suite>

-						<Import-Package>

-							org.apache.felix.ipojo.test.scenarios.service,*

-						</Import-Package>

 					</instructions>

 				</configuration>

 			</plugin>

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/Baz2CheckProvider.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/Baz2CheckProvider.java
index 662c8e2..9fcc4fd 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/Baz2CheckProvider.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/Baz2CheckProvider.java
@@ -20,9 +20,9 @@
 

 import java.util.Properties;

 

-import org.apache.felix.ipojo.test.scenarios.service.BazService;

-import org.apache.felix.ipojo.test.scenarios.service.CheckService;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

+import org.apache.felix.ipojo.test.composite.service.BazService;

+import org.apache.felix.ipojo.test.composite.service.CheckService;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class Baz2CheckProvider implements CheckService {

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/BazProviderType1.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/BazProviderType1.java
index 6917d39..fd495e0 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/BazProviderType1.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/BazProviderType1.java
@@ -20,7 +20,7 @@
 

 import java.util.Properties;

 

-import org.apache.felix.ipojo.test.scenarios.service.BazService;

+import org.apache.felix.ipojo.test.composite.service.BazService;

 

 public class BazProviderType1 implements BazService {

 	

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/CheckProviderParentClass.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/CheckProviderParentClass.java
new file mode 100644
index 0000000..2294ba3
--- /dev/null
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/CheckProviderParentClass.java
@@ -0,0 +1,51 @@
+/* 

+ * Licensed to the Apache Software Foundation (ASF) under one

+ * or more contributor license agreements.  See the NOTICE file

+ * distributed with this work for additional information

+ * regarding copyright ownership.  The ASF licenses this file

+ * to you under the Apache License, Version 2.0 (the

+ * "License"); you may not use this file except in compliance

+ * with the License.  You may obtain a copy of the License at

+ *

+ *   http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing,

+ * software distributed under the License is distributed on an

+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+ * KIND, either express or implied.  See the License for the

+ * specific language governing permissions and limitations

+ * under the License.

+ */

+package org.apache.felix.ipojo.test.composite.component;

+

+import org.apache.felix.ipojo.test.composite.service.FooService;

+import org.osgi.framework.ServiceReference;

+

+public abstract class CheckProviderParentClass {

+    

+    int simpleU = 0;

+    int objectU = 0;

+    int refU = 0;

+    int bothU = 0;

+    

+    

+    public void bothUnbind(FooService o, ServiceReference sr) {

+        if(sr != null && o != null && o instanceof FooService) { bothU++; }

+    }

+    

+    public void refUnbind(ServiceReference sr) {

+        if(sr != null) { refU++; }

+    }

+    

+    public void objectUnbind(FooService o) {

+        if(o != null && o instanceof FooService) { objectU++; }

+        else {

+            System.err.println("Unbind null : " + o);

+        }

+    }

+    

+    public void voidUnbind() {

+        simpleU++;

+    }

+

+}

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/CheckServiceProvider.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/CheckServiceProvider.java
new file mode 100644
index 0000000..9a17f1f
--- /dev/null
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/CheckServiceProvider.java
@@ -0,0 +1,83 @@
+/* 

+ * Licensed to the Apache Software Foundation (ASF) under one

+ * or more contributor license agreements.  See the NOTICE file

+ * distributed with this work for additional information

+ * regarding copyright ownership.  The ASF licenses this file

+ * to you under the Apache License, Version 2.0 (the

+ * "License"); you may not use this file except in compliance

+ * with the License.  You may obtain a copy of the License at

+ *

+ *   http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing,

+ * software distributed under the License is distributed on an

+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+ * KIND, either express or implied.  See the License for the

+ * specific language governing permissions and limitations

+ * under the License.

+ */

+package org.apache.felix.ipojo.test.composite.component;

+

+import java.util.Properties;

+

+import org.apache.felix.ipojo.test.composite.service.CheckService;

+import org.apache.felix.ipojo.test.composite.service.FooService;

+import org.osgi.framework.ServiceReference;

+

+public class CheckServiceProvider extends CheckProviderParentClass implements CheckService {

+    

+	FooService fs;

+	

+	int simpleB = 0;

+	int objectB = 0;

+	int refB = 0;

+	int bothB = 0;

+

+	public boolean check() {

+		return fs.foo();

+	}

+

+	public Properties getProps() {

+		Properties props = new Properties();

+		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));

+		if (fs != null) {

+		    props.put("result", new Boolean(fs.foo()));

+		    props.put("boolean", new Boolean(fs.getBoolean()));

+		    props.put("int", new Integer(fs.getInt()));

+		    props.put("long", new Long(fs.getLong()));

+		    props.put("double", new Double(fs.getDouble()));

+		    if(fs.getObject() != null) { props.put("object", fs.getObject()); }

+		}

+        props.put("static", CheckService.foo);

+        props.put("class", CheckService.class.getName());

+		return props;

+	}

+	

+	private void voidBind() {

+		simpleB++;

+	}

+	

+	protected void objectBind(FooService o) {

+	    if (o == null) {

+	        System.err.println("Bind receive null !!! ");

+	        return;

+	    }

+		if(o != null && o instanceof FooService) { objectB++; }

+	}

+	

+	public void refBind(ServiceReference sr) {

+		if(sr != null) { refB++; }

+	}

+	

+    public void bothBind(FooService o, ServiceReference sr) {

+	    if(sr != null && o != null && o instanceof FooService) { bothB++; }

+	}

+

+}

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooBarProviderType1.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooBarProviderType1.java
new file mode 100644
index 0000000..719f235
--- /dev/null
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooBarProviderType1.java
@@ -0,0 +1,54 @@
+/* 

+ * Licensed to the Apache Software Foundation (ASF) under one

+ * or more contributor license agreements.  See the NOTICE file

+ * distributed with this work for additional information

+ * regarding copyright ownership.  The ASF licenses this file

+ * to you under the Apache License, Version 2.0 (the

+ * "License"); you may not use this file except in compliance

+ * with the License.  You may obtain a copy of the License at

+ *

+ *   http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing,

+ * software distributed under the License is distributed on an

+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+ * KIND, either express or implied.  See the License for the

+ * specific language governing permissions and limitations

+ * under the License.

+ */

+package org.apache.felix.ipojo.test.composite.component;

+

+import java.util.Properties;

+

+import org.apache.felix.ipojo.test.composite.service.BarService;

+import org.apache.felix.ipojo.test.composite.service.FooService;

+

+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/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooProviderType1.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooProviderType1.java
new file mode 100644
index 0000000..fc2ea2b
--- /dev/null
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooProviderType1.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.test.composite.component;

+

+import java.util.Properties;

+

+import org.apache.felix.ipojo.test.composite.service.FooService;

+import org.osgi.framework.BundleContext;

+

+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;

+    

+    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); }

+

+}

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooProviderTypeDyn.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooProviderTypeDyn.java
new file mode 100644
index 0000000..ec5261b
--- /dev/null
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooProviderTypeDyn.java
@@ -0,0 +1,63 @@
+/* 

+ * Licensed to the Apache Software Foundation (ASF) under one

+ * or more contributor license agreements.  See the NOTICE file

+ * distributed with this work for additional information

+ * regarding copyright ownership.  The ASF licenses this file

+ * to you under the Apache License, Version 2.0 (the

+ * "License"); you may not use this file except in compliance

+ * with the License.  You may obtain a copy of the License at

+ *

+ *   http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing,

+ * software distributed under the License is distributed on an

+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+ * KIND, either express or implied.  See the License for the

+ * specific language governing permissions and limitations

+ * under the License.

+ */

+package org.apache.felix.ipojo.test.composite.component;

+

+import java.util.Properties;

+

+import org.apache.felix.ipojo.test.composite.service.FooService;

+

+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/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooProviderTypeDyn2.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooProviderTypeDyn2.java
new file mode 100644
index 0000000..757ae24
--- /dev/null
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/component/FooProviderTypeDyn2.java
@@ -0,0 +1,58 @@
+/* 

+ * Licensed to the Apache Software Foundation (ASF) under one

+ * or more contributor license agreements.  See the NOTICE file

+ * distributed with this work for additional information

+ * regarding copyright ownership.  The ASF licenses this file

+ * to you under the Apache License, Version 2.0 (the

+ * "License"); you may not use this file except in compliance

+ * with the License.  You may obtain a copy of the License at

+ *

+ *   http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing,

+ * software distributed under the License is distributed on an

+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+ * KIND, either express or implied.  See the License for the

+ * specific language governing permissions and limitations

+ * under the License.

+ */

+package org.apache.felix.ipojo.test.composite.component;

+

+import java.util.Properties;

+

+import org.apache.felix.ipojo.test.composite.service.FooService;

+

+public class FooProviderTypeDyn2 implements FooService {

+	

+	private int intProp = 2;

+	private boolean boolProp = true;

+	private String strProp = "foo";

+	private String[] strAProp = new String[] {"foo", "bar"};

+	private int[] intAProp = new int[] {1, 2, 3};

+

+	public boolean foo() {

+		intAProp = null;

+		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/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/FilteredExport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/FilteredExport.java
index 938bb94..8353c03 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/FilteredExport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/FilteredExport.java
@@ -23,9 +23,9 @@
 import org.apache.felix.ipojo.ComponentInstance;

 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.BazService;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.BazService;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class FilteredExport extends OSGiTestCase {

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/MultipleExport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/MultipleExport.java
index 10a0a4e..fed07ba 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/MultipleExport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/MultipleExport.java
@@ -23,9 +23,9 @@
 import org.apache.felix.ipojo.ComponentInstance;

 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.BazService;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.BazService;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class MultipleExport extends OSGiTestCase {

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalExport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalExport.java
index 5c30d24..4f78f49 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalExport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalExport.java
@@ -23,9 +23,9 @@
 import org.apache.felix.ipojo.ComponentInstance;

 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.BazService;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.BazService;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class OptionalExport extends OSGiTestCase {

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalMultipleExport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalMultipleExport.java
index 997be4e..a285ef0 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalMultipleExport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalMultipleExport.java
@@ -23,9 +23,9 @@
 import org.apache.felix.ipojo.ComponentInstance;

 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.BazService;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.BazService;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class OptionalMultipleExport extends OSGiTestCase {

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/SimpleExport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/SimpleExport.java
index 5ee7cd7..b0bf922 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/SimpleExport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/exporter/SimpleExport.java
@@ -23,9 +23,9 @@
 import org.apache.felix.ipojo.ComponentInstance;

 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.BazService;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.BazService;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class SimpleExport extends OSGiTestCase {

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedFilteredImport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedFilteredImport.java
index 659705f..1466677 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedFilteredImport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedFilteredImport.java
@@ -24,8 +24,8 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class DelayedFilteredImport extends OSGiTestCase {

@@ -47,7 +47,7 @@
 		

 		import1.stop();

 		

-		fooProvider = Utils.getFactoryByName(context, "FooProviderType-1");

+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		assertNotNull("Check fooProvider availability", fooProvider);

 		

 		Properties p1 = new Properties();

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedMultipleImport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedMultipleImport.java
index 99b359c..47688ee 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedMultipleImport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedMultipleImport.java
@@ -24,8 +24,8 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class DelayedMultipleImport extends OSGiTestCase {

@@ -47,7 +47,7 @@
 		

 		import2.stop();

 		

-		fooProvider = Utils.getFactoryByName(context, "FooProviderType-1");

+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		assertNotNull("Check fooProvider availability", fooProvider);

 		

 		Properties p1 = new Properties();

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalImport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalImport.java
index 41ffb28..6e36797 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalImport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalImport.java
@@ -24,8 +24,8 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class DelayedOptionalImport extends OSGiTestCase {

@@ -47,7 +47,7 @@
 		

 		import3.stop();

 		

-		fooProvider = Utils.getFactoryByName(context, "FooProviderType-1");

+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		assertNotNull("Check fooProvider availability", fooProvider);

 		

 		Properties p1 = new Properties();

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalMultipleImport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalMultipleImport.java
index de9d875..0dac390 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalMultipleImport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalMultipleImport.java
@@ -24,8 +24,8 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class DelayedOptionalMultipleImport extends OSGiTestCase {

@@ -47,7 +47,7 @@
 		

 		import4.stop();

 		

-		fooProvider = Utils.getFactoryByName(context, "FooProviderType-1");

+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		assertNotNull("Check fooProvider availability", fooProvider);

 		

 		Properties p1 = new Properties();

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedSimpleImport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedSimpleImport.java
index e29055d..2d89ee8 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedSimpleImport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedSimpleImport.java
@@ -24,8 +24,8 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class DelayedSimpleImport extends OSGiTestCase {

@@ -47,7 +47,7 @@
 		

 		import1.stop();

 		

-		fooProvider = Utils.getFactoryByName(context, "FooProviderType-1");

+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		assertNotNull("Check fooProvider availability", fooProvider);

 		

 		Properties p1 = new Properties();

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/FilteredImport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/FilteredImport.java
index 69b3a37..221ecda 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/FilteredImport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/FilteredImport.java
@@ -24,8 +24,8 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class FilteredImport extends OSGiTestCase {

@@ -47,10 +47,10 @@
 		}

 		import1.stop();

 		

-		fooProvider = Utils.getFactoryByName(context, "FooProviderType-1");

+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		assertNotNull("Check fooProvider availability", fooProvider);

 		

-		fooProvider2 = Utils.getFactoryByName(context, "FooProviderType-2");

+		fooProvider2 = Utils.getFactoryByName(context, "COMPO-FooProviderType-2");

 		assertNotNull("Check fooProvider availability", fooProvider2);

 		

 		Properties p1 = new Properties();

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/MultipleImport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/MultipleImport.java
index 4d5df53..c8eedce 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/MultipleImport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/MultipleImport.java
@@ -24,8 +24,8 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class MultipleImport extends OSGiTestCase {

@@ -34,7 +34,7 @@
 	Factory fooProvider;

 

 	public void setUp() {

-		fooProvider = Utils.getFactoryByName(context, "FooProviderType-1");

+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		assertNotNull("Check fooProvider availability", fooProvider);

 		

 		Properties p = new Properties();

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalImport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalImport.java
index 69cd1bb..0fb3f89 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalImport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalImport.java
@@ -24,8 +24,8 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class OptionalImport extends OSGiTestCase {

@@ -34,7 +34,7 @@
 	Factory fooProvider;

 

 	public void setUp() {

-		fooProvider = Utils.getFactoryByName(context, "FooProviderType-1");

+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		assertNotNull("Check fooProvider availability", fooProvider);

 		

 		Properties p = new Properties();

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalMultipleImport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalMultipleImport.java
index 811301d..a7c71b0 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalMultipleImport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalMultipleImport.java
@@ -24,8 +24,8 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class OptionalMultipleImport extends OSGiTestCase {

@@ -34,7 +34,7 @@
 	Factory fooProvider;

 

 	public void setUp() {

-		fooProvider = Utils.getFactoryByName(context, "FooProviderType-1");

+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		assertNotNull("Check fooProvider availability", fooProvider);

 		

 		Properties p = new Properties();

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/SimpleImport.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/SimpleImport.java
index 9bcdc87..31f2b5a 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/SimpleImport.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/importer/SimpleImport.java
@@ -24,8 +24,8 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class SimpleImport extends OSGiTestCase {

@@ -34,7 +34,7 @@
 	Factory fooProvider;

 

 	public void setUp() {

-		fooProvider = Utils.getFactoryByName(context, "FooProviderType-1");

+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		assertNotNull("Check fooProvider availability", fooProvider);

 		

 		Properties p = new Properties();

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/FactoryManagementTest.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/FactoryManagementTest.java
index 8e238a3..43433a9 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/FactoryManagementTest.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/FactoryManagementTest.java
@@ -30,8 +30,8 @@
 import org.apache.felix.ipojo.architecture.ComponentTypeDescription;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

 import org.apache.felix.ipojo.metadata.Element;

+import org.apache.felix.ipojo.test.composite.service.CheckService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.CheckService;

 import org.osgi.framework.BundleContext;

 import org.osgi.framework.ServiceReference;

 import org.osgi.framework.ServiceRegistration;

@@ -217,7 +217,7 @@
 		

 		ServiceContext sc2 = Utils.getServiceContext(empty2);

 		

-		Factory fact1 = Utils.getFactoryByName(sc2, "SimpleCheckServiceProvider");

+		Factory fact1 = Utils.getFactoryByName(sc2, "COMPO-SimpleCheckServiceProvider");

 		Properties props = new Properties();

 		props.put("name", "client");

 		ComponentInstance client = null;

@@ -225,7 +225,7 @@
 			client = fact1.createComponentInstance(props);

 		} catch (Exception e) { e.printStackTrace(); fail("Cannot instantiate the client : " + e.getMessage()); }

 		

-		Factory fact2 = Utils.getFactoryByName(sc2, "FooProviderType-1");

+		Factory fact2 = Utils.getFactoryByName(sc2, "COMPO-FooProviderType-1");

 		Properties props2 = new Properties();

 		props2.put("name", "provider");

 		ComponentInstance provider = null;

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/ServiceRangeTest.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/ServiceRangeTest.java
index 740f129..a2d9f3c 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/ServiceRangeTest.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/ServiceRangeTest.java
@@ -24,9 +24,9 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.CheckService;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.CheckService;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.InvalidSyntaxException;

 import org.osgi.framework.ServiceReference;

 

@@ -53,7 +53,7 @@
 	public void testLevelOne1() {

 		ServiceContext sc2 = Utils.getServiceContext(empty);

 		

-		Factory fact1 = Utils.getFactoryByName(sc2, "SimpleCheckServiceProvider");

+		Factory fact1 = Utils.getFactoryByName(sc2, "COMPO-SimpleCheckServiceProvider");

 		Properties props = new Properties();

 		props.put("name", "client");

 		ComponentInstance client = null;

@@ -61,7 +61,7 @@
 			client = fact1.createComponentInstance(props);

 		} catch(Exception e) { fail("Cannot instantiate the client : " + e.getMessage()); }

 		

-		Factory fact2 = Utils.getFactoryByName(sc2, "FooProviderType-1");

+		Factory fact2 = Utils.getFactoryByName(sc2, "COMPO-FooProviderType-1");

 		Properties props2 = new Properties();

 		props2.put("name", "provider");

 		ComponentInstance provider = null;

@@ -105,7 +105,7 @@
 	public void testLevelOne2() {

 		ServiceContext sc2 = Utils.getServiceContext(empty);

 		

-		Factory fact1 = Utils.getFactoryByName(sc2, "SimpleCheckServiceProvider");

+		Factory fact1 = Utils.getFactoryByName(sc2, "COMPO-SimpleCheckServiceProvider");

 		Properties props = new Properties();

 		props.put("name", "client");

 		ComponentInstance client = null;

@@ -113,7 +113,7 @@
 			client = fact1.createComponentInstance(props, sc2);

 		} catch(Exception e) { fail("Cannot instantiate the client : " + e.getMessage()); }

 		

-		Factory fact2 = Utils.getFactoryByName(sc2, "FooProviderType-1");

+		Factory fact2 = Utils.getFactoryByName(sc2, "COMPO-FooProviderType-1");

 		Properties props2 = new Properties();

 		props2.put("name", "provider");

 		ComponentInstance provider = null;

@@ -157,7 +157,7 @@
 	public void testLevelOne3() {

 		ServiceContext sc2 = Utils.getServiceContext(empty);

 		

-		Factory fact1 = Utils.getFactoryByName(context, "SimpleCheckServiceProvider");

+		Factory fact1 = Utils.getFactoryByName(context, "COMPO-SimpleCheckServiceProvider");

 		Properties props = new Properties();

 		props.put("name", "client");

 		ComponentInstance client = null;

@@ -165,7 +165,7 @@
 			client = fact1.createComponentInstance(props, sc2);

 		} catch(Exception e) { fail("Cannot instantiate the client : " + e.getMessage()); }

 		

-		Factory fact2 = Utils.getFactoryByName(context, "FooProviderType-1");

+		Factory fact2 = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		Properties props2 = new Properties();

 		props2.put("name", "provider");

 		ComponentInstance provider = null;

@@ -220,7 +220,7 @@
 		

 		ServiceContext sc2 = Utils.getServiceContext(empty2);

 		

-		Factory fact1 = Utils.getFactoryByName(sc2, "SimpleCheckServiceProvider");

+		Factory fact1 = Utils.getFactoryByName(sc2, "COMPO-SimpleCheckServiceProvider");

 		Properties props = new Properties();

 		props.put("name", "client");

 		ComponentInstance client = null;

@@ -228,7 +228,7 @@
 			client = fact1.createComponentInstance(props);

 		} catch(Exception e) { fail("Cannot instantiate the client : " + e.getMessage()); }

 		

-		Factory fact2 = Utils.getFactoryByName(sc2, "FooProviderType-1");

+		Factory fact2 = Utils.getFactoryByName(sc2, "COMPO-FooProviderType-1");

 		Properties props2 = new Properties();

 		props2.put("name", "provider");

 		ComponentInstance provider = null;

@@ -288,7 +288,7 @@
 		

 		ServiceContext sc2 = Utils.getServiceContext(empty2);

 		

-		Factory fact1 = Utils.getFactoryByName(sc1, "SimpleCheckServiceProvider");

+		Factory fact1 = Utils.getFactoryByName(sc1, "COMPO-SimpleCheckServiceProvider");

 		Properties props = new Properties();

 		props.put("name", "client");

 		ComponentInstance client = null;

@@ -296,7 +296,7 @@
 			client = fact1.createComponentInstance(props, sc2);

 		} catch(Exception e) { fail("Cannot instantiate the client : " + e.getMessage()); }

 		

-		Factory fact2 = Utils.getFactoryByName(sc1, "FooProviderType-1");

+		Factory fact2 = Utils.getFactoryByName(sc1, "COMPO-FooProviderType-1");

 		Properties props2 = new Properties();

 		props2.put("name", "provider");

 		ComponentInstance provider = null;

@@ -356,7 +356,7 @@
 		

 		ServiceContext sc2 = Utils.getServiceContext(empty2);

 		

-		Factory fact1 = Utils.getFactoryByName(context, "SimpleCheckServiceProvider");

+		Factory fact1 = Utils.getFactoryByName(context, "COMPO-SimpleCheckServiceProvider");

 		Properties props = new Properties();

 		props.put("name", "client");

 		ComponentInstance client = null;

@@ -364,7 +364,7 @@
 			client = fact1.createComponentInstance(props, sc2);

 		} catch(Exception e) { fail("Cannot instantiate the client : " + e.getMessage()); }

 		

-		Factory fact2 = Utils.getFactoryByName(context, "FooProviderType-1");

+		Factory fact2 = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

 		Properties props2 = new Properties();

 		props2.put("name", "provider");

 		ComponentInstance provider = null;

@@ -424,7 +424,7 @@
 		

 		ServiceContext sc2 = Utils.getServiceContext(empty2);

 		

-		Factory fact1 = Utils.getFactoryByName(sc2, "SimpleCheckServiceProvider");

+		Factory fact1 = Utils.getFactoryByName(sc2, "COMPO-SimpleCheckServiceProvider");

 		Properties props = new Properties();

 		props.put("name", "client");

 		ComponentInstance client = null;

@@ -432,7 +432,7 @@
 			client = fact1.createComponentInstance(props, sc2);

 		} catch(Exception e) { fail("Cannot instantiate the client : " + e.getMessage()); }

 		

-		Factory fact2 = Utils.getFactoryByName(sc2, "FooProviderType-1");

+		Factory fact2 = Utils.getFactoryByName(sc2, "COMPO-FooProviderType-1");

 		Properties props2 = new Properties();

 		props2.put("name", "provider");

 		ComponentInstance provider = null;

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/ServiceRegistryTest.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/ServiceRegistryTest.java
index 0b76bcb..14b3f61 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/ServiceRegistryTest.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/infrastructure/ServiceRegistryTest.java
@@ -28,7 +28,7 @@
 import org.apache.felix.ipojo.architecture.InstanceDescription;

 import org.apache.felix.ipojo.context.ServiceRegistry;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

-import org.apache.felix.ipojo.test.scenarios.service.BarService;

+import org.apache.felix.ipojo.test.composite.service.BarService;

 import org.osgi.framework.BundleContext;

 import org.osgi.framework.InvalidSyntaxException;

 import org.osgi.framework.ServiceEvent;

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instance/SimpleInstance.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instance/SimpleInstance.java
index 433f62f..179c296 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instance/SimpleInstance.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instance/SimpleInstance.java
@@ -27,8 +27,8 @@
 import org.apache.felix.ipojo.architecture.Architecture;

 import org.apache.felix.ipojo.architecture.InstanceDescription;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class SimpleInstance extends OSGiTestCase {

@@ -39,8 +39,8 @@
 	

 	

 	public void setUp() {

-        fooFactory1 = (ComponentFactory) Utils.getFactoryByName(context, "FooProviderType-1");

-        fooFactory2 = (ComponentFactory) Utils.getFactoryByName(context, "FooProviderType-Dyn2");

+        fooFactory1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooProviderType-1");

+        fooFactory2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooProviderType-Dyn2");

         compoFactory = (ComponentFactory) Utils.getFactoryByName(context, "composite.inst.1");

 		Factory fact = Utils.getFactoryByName(context, "composite.empty");

 		Properties props = new Properties();

@@ -59,14 +59,15 @@
 	

 	public void testCreation() {

 		Properties props = new Properties();

-		props.put("name", "under");

+		props.put("name", "under-A");

 		ComponentInstance under = null;

 		try {

 			under = compoFactory.createComponentInstance(props);

 		} catch(Exception e) {

 		    e.printStackTrace();

 			fail("Cannot instantiate under from " + compoFactory.getName() + " -> " + e.getMessage());

-		}

+		}      

+		

 		assertTrue("Check instance validity", under.getState() == ComponentInstance.VALID);

 		under.dispose();

 	}

@@ -203,9 +204,9 @@
 		assertEquals("Check instance name" , id.getName(), "under");

 		assertEquals("Check component type name" , id.getComponentDescription().getName(), "composite.bar.1");

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		fact1.stop();

 		assertTrue("Check instance validity - 2", under.getState() == ComponentInstance.VALID);

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/ConfigurableInstantiation.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/ConfigurableInstantiation.java
index a7de283..2c851ea 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/ConfigurableInstantiation.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/ConfigurableInstantiation.java
@@ -23,9 +23,10 @@
 import org.apache.felix.ipojo.ComponentFactory;

 import org.apache.felix.ipojo.ComponentInstance;

 import org.apache.felix.ipojo.ServiceContext;

+import org.apache.felix.ipojo.architecture.Architecture;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.ServiceReference;

 

 public class ConfigurableInstantiation extends OSGiTestCase {

@@ -45,13 +46,14 @@
 	

 	public void testAccept() {

 		Properties props = new Properties();

-		props.put("name", "under");

+		props.put("name", "under-A");

 		ComponentInstance under = null;

 		try {

 			under = acceptF.createComponentInstance(props);

 		} catch(Exception e) {

 			fail("Cannot instantiate under : " + e.getMessage());

 		}

+		

 		assertTrue("Check instance validity", under.getState() == ComponentInstance.VALID);

 		ServiceContext sc = Utils.getServiceContext(under);

 		ServiceReference ref = sc.getServiceReference(FooService.class.getName());

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/MultipleInstantiation.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/MultipleInstantiation.java
index 066f29d..f155add 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/MultipleInstantiation.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/MultipleInstantiation.java
@@ -27,8 +27,8 @@
 import org.apache.felix.ipojo.architecture.Architecture;

 import org.apache.felix.ipojo.architecture.InstanceDescription;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.BarService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.BarService;

 import org.osgi.framework.ServiceReference;

 

 public class MultipleInstantiation extends OSGiTestCase {

@@ -128,9 +128,9 @@
 		ServiceContext sc = Utils.getServiceContext(under);

 		assertTrue("Check instance validity - 1", under.getState() == ComponentInstance.VALID);

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		fact1.stop();

 		assertTrue("Check instance validity - 2", under.getState() == ComponentInstance.VALID);

@@ -166,9 +166,9 @@
 		assertTrue("Check instance validity - 1", under.getState() == ComponentInstance.VALID);

 		ServiceContext sc2 = Utils.getServiceContext(under);

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		fact1.stop();

 		assertTrue("Check instance validity - 2", under.getState() == ComponentInstance.VALID);

@@ -211,9 +211,9 @@
 		assertEquals("Check instance name" , id.getName(), "under");

 		assertEquals("Check component type name" , id.getComponentDescription().getName(), "composite.bar.2");

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		fact1.stop();

 		assertTrue("Check instance validity - 2", under.getState() == ComponentInstance.VALID);

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/OptionalInstantiation.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/OptionalInstantiation.java
index 64f80f9..e617d64 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/OptionalInstantiation.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/OptionalInstantiation.java
@@ -27,8 +27,8 @@
 import org.apache.felix.ipojo.architecture.Architecture;

 import org.apache.felix.ipojo.architecture.InstanceDescription;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.BarService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.BarService;

 import org.osgi.framework.ServiceReference;

 

 public class OptionalInstantiation extends OSGiTestCase {

@@ -124,9 +124,9 @@
 		}

 		assertTrue("Check instance validity - 1", under.getState() == ComponentInstance.VALID);

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		fact1.stop();

 		assertTrue("Check instance validity - 2", under.getState() == ComponentInstance.VALID);

@@ -159,9 +159,9 @@
 		}

 		assertTrue("Check instance validity - 1", under.getState() == ComponentInstance.VALID);

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		fact1.stop();

 		assertTrue("Check instance validity - 2", under.getState() == ComponentInstance.VALID);

@@ -203,9 +203,9 @@
 		assertEquals("Check instance name" , id.getName(), "under");

 		assertEquals("Check component type name" , id.getComponentDescription().getName(), "composite.bar.3");

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		

 		fact1.stop();

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/OptionalMultipleInstantiation.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/OptionalMultipleInstantiation.java
index 19984d0..a3d9351 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/OptionalMultipleInstantiation.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/OptionalMultipleInstantiation.java
@@ -25,8 +25,8 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.BarService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.BarService;

 

 public class OptionalMultipleInstantiation extends OSGiTestCase {

 

@@ -127,9 +127,9 @@
 		ServiceContext sc = Utils.getServiceContext(under);

 		assertTrue("Check instance validity - 1", under.getState() == ComponentInstance.VALID);

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		fact1.stop();

 		assertTrue("Check instance validity - 2", under.getState() == ComponentInstance.VALID);

@@ -165,9 +165,9 @@
 		assertTrue("Check instance validity - 1", under.getState() == ComponentInstance.VALID);

 		ServiceContext sc2 = Utils.getServiceContext(under);

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		fact1.stop();

 		assertTrue("Check instance validity - 2", under.getState() == ComponentInstance.VALID);

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/SimpleInstantiation.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/SimpleInstantiation.java
index 14b1e1d..4430c19 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/SimpleInstantiation.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/instantiator/SimpleInstantiation.java
@@ -27,8 +27,8 @@
 import org.apache.felix.ipojo.architecture.Architecture;

 import org.apache.felix.ipojo.architecture.InstanceDescription;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.BarService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.BarService;

 import org.osgi.framework.ServiceReference;

 

 public class SimpleInstantiation extends OSGiTestCase {

@@ -125,9 +125,9 @@
 		}

 		assertTrue("Check instance validity - 1", under.getState() == ComponentInstance.VALID);

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		

 		fact1.stop();

@@ -159,9 +159,9 @@
 		}

 		assertTrue("Check instance validity - 1", under.getState() == ComponentInstance.VALID);

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		fact1.stop();

 		assertTrue("Check instance validity - 2", under.getState() == ComponentInstance.VALID);

@@ -201,9 +201,9 @@
 		assertEquals("Check instance name" , id.getName(), "under");

 		assertEquals("Check component type name" , id.getComponentDescription().getName(), "composite.bar.1");

 		

-		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-1");

-		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-2");

-		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "FooBarProviderType-3");

+		ComponentFactory fact1 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-1");

+		ComponentFactory fact2 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-2");

+		ComponentFactory fact3 = (ComponentFactory) Utils.getFactoryByName(context, "COMPO-FooBarProviderType-3");

 		

 		fact1.stop();

 		assertTrue("Check instance validity - 2", under.getState() == ComponentInstance.VALID);

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/BarService.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/BarService.java
new file mode 100644
index 0000000..8b24f04
--- /dev/null
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/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.test.composite.service;

+

+import java.util.Properties;

+

+public interface BarService {

+	

+	public boolean bar();

+	

+	public Properties getProps();

+

+}

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/BazService.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/BazService.java
new file mode 100644
index 0000000..88b78a1
--- /dev/null
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/BazService.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.test.composite.service;

+

+import java.util.Properties;

+

+public interface BazService {

+

+	boolean foo();

+	

+	Properties fooProps();

+	

+	Boolean getObject();

+	

+	boolean getBoolean();

+	

+	int getInt();

+	

+	long getLong();

+	

+	double getDouble();

+	

+}

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/CheckService.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/CheckService.java
new file mode 100644
index 0000000..8eb499f
--- /dev/null
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/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.test.composite.service;

+

+import java.util.Properties;

+

+public interface CheckService {

+    

+    public static final String foo = "foo";

+	

+	public boolean check();

+	

+	public Properties getProps();

+

+}

diff --git a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/FooService.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/FooService.java
new file mode 100644
index 0000000..bbfa2c9
--- /dev/null
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/service/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.test.composite.service;

+

+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/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/test/CompositeTest.java b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/test/CompositeTest.java
index 9f7c6c4..e7f73bb 100644
--- a/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/test/CompositeTest.java
+++ b/ipojo/tests/tests.composite/src/main/java/org/apache/felix/ipojo/test/composite/test/CompositeTest.java
@@ -24,10 +24,10 @@
 import org.apache.felix.ipojo.Factory;

 import org.apache.felix.ipojo.ServiceContext;

 import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;

+import org.apache.felix.ipojo.test.composite.service.BazService;

+import org.apache.felix.ipojo.test.composite.service.CheckService;

+import org.apache.felix.ipojo.test.composite.service.FooService;

 import org.apache.felix.ipojo.test.composite.util.Utils;

-import org.apache.felix.ipojo.test.scenarios.service.BazService;

-import org.apache.felix.ipojo.test.scenarios.service.CheckService;

-import org.apache.felix.ipojo.test.scenarios.service.FooService;

 import org.osgi.framework.InvalidSyntaxException;

 import org.osgi.framework.ServiceReference;

 

diff --git a/ipojo/tests/tests.composite/src/main/resources/metadata.xml b/ipojo/tests/tests.composite/src/main/resources/metadata.xml
index 2357580..23636cf 100644
--- a/ipojo/tests/tests.composite/src/main/resources/metadata.xml
+++ b/ipojo/tests/tests.composite/src/main/resources/metadata.xml
@@ -1,26 +1,98 @@
 <ipojo xmlns:cs="org.apache.felix.ipojo.test.composite.handler.CheckServiceHandler">

+	<!-- Used component type -->

+	<component

+		className="org.apache.felix.ipojo.test.composite.component.FooProviderType1"

+		factory="COMPO-FooProviderType-1" architecture="true">

+		<provides />

+	</component>

+	<component

+		className="org.apache.felix.ipojo.test.composite.component.FooProviderType1"

+		name="COMPO-FooProviderType-2" architecture="true">

+		<provides>

+			<property name="int" type="int" value="2" />

+			<property name="long" type="long" value="40" />

+			<property name="string" type="java.lang.String" value="foo" />

+			<property name="strAProp" type="java.lang.String[]"

+				value="{foo, bar}" />

+			<property name="intAProp" type="int[]" value="{1,2,3}" />

+		</provides>

+	</component>

+	<component

+		className="org.apache.felix.ipojo.test.composite.component.FooProviderTypeDyn"

+		name="COMPO-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>

+	<component

+		className="org.apache.felix.ipojo.test.composite.component.FooProviderTypeDyn2"

+		name="COMPO-FooProviderType-Dyn2" factory="true" architecture="true">

+		<provides>

+			<property name="int" field="intProp" value="4" />

+			<property name="boolean" field="boolProp" />

+			<property name="string" field="strProp" />

+			<property name="strAProp" field="strAProp" />

+			<property name="intAProp" field="intAProp"

+				value="{1, 2,3 }" />

+		</provides>

+	</component>

+	<component

+		className="org.apache.felix.ipojo.test.composite.component.CheckServiceProvider"

+		factory="COMPO-SimpleCheckServiceProvider" architecture="true">

+		<requires field="fs" />

+		<provides />

+	</component>

+	<component

+		className="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"

+		factory="COMPO-FooBarProviderType-1" architecture="true">

+		<provides />

+	</component>

+	<component

+		className="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"

+		factory="COMPO-FooBarProviderType-2" architecture="true">

+		<provides

+			interface="{org.apache.felix.ipojo.test.composite.service.FooService, org.apache.felix.ipojo.test.composite.service.BarService }" />

+	</component>

+	<component

+		className="org.apache.felix.ipojo.test.composite.component.FooBarProviderType1"

+		factory="COMPO-FooBarProviderType-3" architecture="true">

+		<provides

+			interface="{org.apache.felix.ipojo.test.composite.service.FooService}">

+			<property name="baz" type="java.lang.String" value="foo" />

+		</provides>

+		<provides

+			interface="{org.apache.felix.ipojo.test.composite.service.BarService}">

+			<property name="baz" type="java.lang.String" value="bar" />

+		</provides>

+	</component>

+	

 	<!--  Composite -->

 	<composite name="composite.empty" factory="true" architecture="true">

 	</composite>

 	

 	<composite name="composite.bar.1" architecture="true">

-		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BarService"/>

+		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService"/>

 	</composite>

 	

 	<composite name="composite.bar.2" architecture="true">

-		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BarService" aggregate="true"/>

+		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService" aggregate="true"/>

 	</composite>

 	

 	<composite name="composite.bar.3" architecture="true">

-		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BarService" optional="true"/>

+		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService" optional="true"/>

 	</composite>

 	

 	<composite name="composite.bar.4" architecture="true">

-		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" aggregate="true" optional="true"/>

+		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.FooService" aggregate="true" optional="true"/>

 	</composite>

 	

 	<composite name="composite.bar.5-accept" architecture="true">

-		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.FooService">

+		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.FooService">

 			<property name="boolean" value="true"/>

 			<property name="string" value="foo"/>

 			<property name="strAprop" value="{foo, bar, baz}"/>

@@ -29,7 +101,7 @@
 	</composite>

 	

 	<composite name="composite.bar.5-refuse1" architecture="true">

-		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BarService">

+		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService">

 			<property name="foo" value="bar"/>

 			<property name="boolean" value="true"/>

 			<property name="string" value="foo"/>

@@ -39,15 +111,15 @@
 	</composite>

 	

 	<composite name="composite.bar.5-refuse2" architecture="true">

-		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BarService">

+		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BarService">

 			<property name="string" value="foo"/>

 			<property name="strAprop" value="{foo, bar, baz}"/>

 		</subservice>

 	</composite>

 	

 	<composite name="composite.inst.1" factory="true" architecture="true">

-		<instance component="FooProviderType-1" /> <!-- name="FooProv"  -->

-		<instance component="FooProviderType-Dyn2">

+		<instance component="COMPO-FooProviderType-1" /> <!-- name="FooProv"  -->

+		<instance component="COMPO-FooProviderType-Dyn2">

 			<property name="boolean" value="true"/>

 			<property name="string" value="foo"/>

 			<property name="strAProp" value="{a,b,c}"/>

@@ -55,23 +127,23 @@
 	</composite>

 	

 	<composite name="composite.requires.1" architecture="true">

-		<subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" scope="composite"/>

+		<subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.FooService" scope="composite"/>

 	</composite>

 	

 	<composite name="composite.requires.2" architecture="true">

-		<subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" aggregate="true" scope="composite"/>

+		<subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.FooService" aggregate="true" scope="composite"/>

 	</composite>

 	

 	<composite name="composite.requires.3" architecture="true">

-		<subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" optional="true" scope="composite"/>

+		<subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.FooService" optional="true" scope="composite"/>

 	</composite>

 	

 	<composite name="composite.requires.4" architecture="true">

-		<subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" optional="true" aggregate="true" scope="composite"/>

+		<subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.FooService" optional="true" aggregate="true" scope="composite"/>

 	</composite>

 	

 	<composite name="composite.requires.5" architecture="true">

-		<subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.FooService" filter="(&amp;(int=2)(long=40))" scope="composite"/>

+		<subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.FooService" filter="(&amp;(int=2)(long=40))" scope="composite"/>

 	</composite>

 	

 	<component className="org.apache.felix.ipojo.test.composite.component.BazProviderType1" factory="BazProviderType" scope="composite">

@@ -79,28 +151,28 @@
 	</component>

 	

 	<composite name="composite.export.1" architecture="true">

-		<subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>

-		<provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService"/>

+		<subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>

+		<provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService"/>

 	</composite>

 	

 	<composite name="composite.export.2" architecture="true">

-		<subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" scope="composite" aggregate="true" optional="true" filter="(!(instance.name=export))"/>

-		<provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" optional="true"/>

+		<subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" scope="composite" aggregate="true" optional="true" filter="(!(instance.name=export))"/>

+		<provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService" optional="true"/>

 	</composite>

 	

 	<composite name="composite.export.3" architecture="true">

-		<subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" scope="composite" aggregate="true" optional="true" filter="(!(instance.name=export))"/>

-		<provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true"/>

+		<subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" scope="composite" aggregate="true" optional="true" filter="(!(instance.name=export))"/>

+		<provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true"/>

 	</composite>

 	

 	<composite name="composite.export.4" architecture="true">

-		<subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>

-		<provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true" optional="true"/>

+		<subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>

+		<provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true" optional="true"/>

 	</composite>

 	

 	<composite name="composite.export.5" architecture="true">

-		<subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>

-		<provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" filter="(instance.name=foo1)"/>

+		<subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true" optional="true" filter="(!(instance.name=export))" scope="composite"/>

+		<provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService" filter="(instance.name=foo1)"/>

 	</composite>

 	

 	<component className="org.apache.felix.ipojo.test.composite.component.Baz2CheckProvider" factory="Baz2CheckProvider" architecture="true">

@@ -109,27 +181,27 @@
 	</component>

 

 	<composite name="composite.test.3" architecture="true">

-		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" aggregate="true" filter="(factory.name=BazProviderType)"/>

-		<provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService"/>

+		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BazService" aggregate="true" filter="(factory.name=BazProviderType)"/>

+		<provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService"/>

 	</composite>

 	

 	<composite name="composite.test.2" architecture="true">

-		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.CheckService" filter="(factory.name=Baz2CheckProvider)"/>

-		<provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.CheckService"/>

-		<subservice action="import" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" scope="composite"/>

+		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.CheckService" filter="(factory.name=Baz2CheckProvider)"/>

+		<provides action="export" specification="org.apache.felix.ipojo.test.composite.service.CheckService"/>

+		<subservice action="import" specification="org.apache.felix.ipojo.test.composite.service.BazService" scope="composite"/>

 	</composite>

 	

 	<composite name="composite.test.1" architecture="true">

-		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" filter="(factory.name=composite.test.3)" />

-		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.CheckService" filter="(factory.name=composite.test.2)"/>

-		<provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.CheckService"/>

+		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BazService" filter="(factory.name=composite.test.3)" />

+		<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.CheckService" filter="(factory.name=composite.test.2)"/>

+		<provides action="export" specification="org.apache.felix.ipojo.test.composite.service.CheckService"/>

 	</composite>

 

 	<composite name="composite.instantiator" architecture="true">

-				<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.BazService" filter="(factory.name=composite.test.3)"/>

-				<subservice action="instantiate" specification="org.apache.felix.ipojo.test.scenarios.service.FooService"/>

-				<provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.BazService"/>

-				<provides action="export" specification="org.apache.felix.ipojo.test.scenarios.service.FooService"/>

+				<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.BazService" filter="(factory.name=composite.test.3)"/>

+				<subservice action="instantiate" specification="org.apache.felix.ipojo.test.composite.service.FooService"/>

+				<provides action="export" specification="org.apache.felix.ipojo.test.composite.service.BazService"/>

+				<provides action="export" specification="org.apache.felix.ipojo.test.composite.service.FooService"/>

 	</composite>

 

 	<!-- Test composition provides -->