diff --git a/ipojo/tests/tests.composite.service.import-export/pom.xml b/ipojo/tests/tests.composite.service.import-export/pom.xml
new file mode 100644
index 0000000..50fdc8d
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/pom.xml
@@ -0,0 +1,101 @@
+<!--
+	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>
+	<modelVersion>4.0.0</modelVersion>
+	<packaging>bundle</packaging>
+	<name>iPOJO Composite (Service Import/Export) Test Suite</name>
+	<artifactId>tests.composite.service.import-export</artifactId>
+	<groupId>ipojo.tests</groupId>
+	<version>0.7.6-SNAPSHOT</version>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.ipojo</artifactId>
+			<version>0.7.6-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.ipojo.composite</artifactId>
+			<version>0.7.6-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.ipojo.metadata</artifactId>
+			<version>0.7.6-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.osgi.core</artifactId>
+			<version>1.0.0</version>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+		</dependency>
+		<dependency>
+			<groupId>ipojo.examples</groupId>
+			<artifactId>org.apache.felix.ipojo.junit4osgi</artifactId>
+			<version>0.7.6-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>ipojo.tests</groupId>
+			<artifactId>tests.composite</artifactId>
+			<version>0.7.6-SNAPSHOT</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<version>1.4.0</version>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>
+							${pom.artifactId}
+						</Bundle-SymbolicName>
+						<Private-Package>
+							org.apache.felix.ipojo.test.composite.exporter, org.apache.felix.ipojo.test.composite.importer
+						</Private-Package>
+						<Test-Suite>
+							org.apache.felix.ipojo.test.composite.importer.ImportTestSuite, org.apache.felix.ipojo.test.composite.exporter.ExportTestSuite
+						</Test-Suite>
+					</instructions>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-ipojo-plugin</artifactId>
+				<version>0.7.6-SNAPSHOT</version>
+				<executions>
+					<execution>
+						<goals>
+							<goal>ipojo-bundle</goal>
+						</goals>
+						<configuration>
+							<ignoreAnnotations>true</ignoreAnnotations>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+</project>
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/ExportTestSuite.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/ExportTestSuite.java
new file mode 100644
index 0000000..d9b84f1
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/ExportTestSuite.java
@@ -0,0 +1,40 @@
+/* 
+ * 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.exporter;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.felix.ipojo.junit4osgi.OSGiTestSuite;
+import org.osgi.framework.BundleContext;
+
+public class ExportTestSuite extends TestSuite {
+
+	public static Test suite(BundleContext bc) {
+		OSGiTestSuite ots = new OSGiTestSuite("Composite Service Exporters Test Suite", bc);
+		ots.addTestSuite(SimpleExport.class);
+		ots.addTestSuite(OptionalExport.class);
+		ots.addTestSuite(MultipleExport.class);
+		ots.addTestSuite(OptionalMultipleExport.class);
+		ots.addTestSuite(FilteredExport.class);
+		ots.setBundleContext(bc);
+		return ots;
+	}
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/FilteredExport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/FilteredExport.java
new file mode 100644
index 0000000..8353c03
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/FilteredExport.java
@@ -0,0 +1,230 @@
+/* 
+ * 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.exporter;
+
+import java.util.Properties;
+
+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.osgi.framework.ServiceReference;
+
+public class FilteredExport extends OSGiTestCase {
+	
+	ComponentInstance export1;
+	Factory fooProvider;
+	ComponentInstance foo1 = null, foo2 = null;
+	
+	public void setUp() {
+		fooProvider = Utils.getFactoryByName(context, "BazProviderType");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p1 = new Properties();
+		p1.put("name", "foo1");
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		
+		try {
+			foo1 = fooProvider.createComponentInstance(p1);
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to create foos : " + e.getMessage());
+		}
+		
+		foo1.stop();
+		foo2.stop();
+		
+		Factory factory = Utils.getFactoryByName(context, "composite.export.5");
+		Properties props = new Properties();
+		props.put("name", "export");
+		try {
+			export1 = factory.createComponentInstance(props);
+		} catch(Exception e) {
+			fail("Fail to instantiate exporter " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		foo1.dispose();
+		foo2.dispose();
+		export1.dispose();
+		foo1 = null;
+		foo2 = null;
+		export1 = null;
+	}
+	
+	public void test1() {
+		export1.start();
+		
+		// Check that no foo service are available
+		assertEquals("Check no foo service", Utils.getServiceReferences(context, FooService.class.getName(), null).length, 0);
+		
+		// Test invalidity
+		assertTrue("Check invalidity - 0", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 0", isFooServiceProvided());
+		assertEquals("Check number of provides - 0", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 1", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo2.start();
+		assertTrue("Check validity - 2", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke());
+		
+		foo1.stop();
+		assertTrue("Check invalidity - 3", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 0);
+		
+		foo2.stop();
+		assertTrue("Check invalidity - 4", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 0);
+		
+		foo2.start();
+		assertTrue("Check invalidity - 5", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 5", isFooServiceProvided());
+		assertEquals("Check number of provides - 5", countFooServiceProvided(), 0);
+	}
+	
+	public void test2() {
+		export1.start();
+		
+		// Test invalidity
+		assertTrue("Check invalidity - 0", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 0", isFooServiceProvided());
+		assertEquals("Check number of provides - 0", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 1", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo2.start();
+		assertTrue("Check validity - 2", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke());
+		
+		foo2.stop();
+		assertTrue("Check validity - 3", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 3", invoke());
+		
+		foo1.stop();
+		assertTrue("Check invalidity - 4", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 5", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 5", isFooServiceProvided());
+		assertEquals("Check number of provides - 5", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 5", invoke());
+	}
+	
+	public void test3() {
+		foo1.start();
+		foo2.start();
+		
+		export1.start();
+		assertTrue("Check validity - 1", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo1.stop();
+		assertTrue("Check invalidity - 2", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 0);
+		
+		foo2.stop();
+		assertTrue("Check invalidity - 3", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 4", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 4", invoke());
+	}
+	
+	public void test4() {
+		foo1.start();
+		foo2.start();
+		
+		export1.start();
+		assertTrue("Check validity - 1", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo2.stop();
+		assertTrue("Check validity - 2", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke());
+		
+		foo1.stop();
+		assertTrue("Check invalidity - 3", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 0);
+		
+		foo2.start();
+		assertTrue("Check invalidity - 4", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 0);
+	}
+	
+	
+	
+	private boolean isFooServiceProvided() {
+		ServiceReference ref = Utils.getServiceReferenceByName(context, BazService.class.getName(), export1.getInstanceName());
+		return ref != null;
+	}
+	
+	private int countFooServiceProvided() {
+		ServiceReference[] refs = Utils.getServiceReferences(context, BazService.class.getName(), "(instance.name="+export1.getInstanceName()+")");
+		return refs.length;
+	}
+	
+	private boolean invoke() {
+		ServiceReference ref = Utils.getServiceReferenceByName(context, BazService.class.getName(), export1.getInstanceName());
+		if(ref == null) { return false; }
+		BazService fs = (BazService) context.getService(ref);
+		return fs.foo();
+	}
+	
+	
+	
+	
+	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/MultipleExport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/MultipleExport.java
new file mode 100644
index 0000000..fed07ba
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/MultipleExport.java
@@ -0,0 +1,247 @@
+/* 
+ * 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.exporter;
+
+import java.util.Properties;
+
+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.osgi.framework.ServiceReference;
+
+public class MultipleExport extends OSGiTestCase {
+	
+	ComponentInstance export3;
+	Factory fooProvider;
+	ComponentInstance foo1 = null, foo2 = null;
+
+	public void setUp() {
+		fooProvider = Utils.getFactoryByName(context, "BazProviderType");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p1 = new Properties();
+		p1.put("name", "foo1");
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		
+		try {
+			foo1 = fooProvider.createComponentInstance(p1);
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to create foos : " + e.getMessage());
+		}
+		
+		foo1.stop();
+		foo2.stop();
+		
+		Factory factory = Utils.getFactoryByName(context, "composite.export.3");
+		Properties props = new Properties();
+		props.put("name", "export");
+		try {
+			export3 = factory.createComponentInstance(props);
+		} catch(Exception e) {
+			fail("Fail to instantiate exporter " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		foo1.dispose();
+		foo2.dispose();
+		export3.dispose();
+		foo1 = null;
+		foo2 = null;
+		export3 = null;
+	}
+	
+	public void test1() {
+		export3.start();
+		
+		// Check that no foo service are available
+		assertEquals("Check no foo service", Utils.getServiceReferences(context, FooService.class.getName(), null).length, 0);
+		
+		// Test invalidity
+		assertTrue("Check invalidity - 0", export3.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 0", isFooServiceProvided());
+		assertEquals("Check number of provides - 0", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 1", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke(1));
+		
+		foo2.start();
+		assertTrue("Check validity - 2", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 2);
+		assertTrue("Check invocation - 2", invoke(2));
+		
+		foo1.stop();
+		assertTrue("Check validity - 3", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3 ("+countFooServiceProvided()+")", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 3", invoke(1));
+		
+		foo2.stop();
+		assertTrue("Check invalidity - 4", export3.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 0);
+		
+		foo2.start();
+		assertTrue("Check validity - 5", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 5", isFooServiceProvided());
+		assertEquals("Check number of provides - 5", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 5", invoke(1));
+	}
+	
+	public void test2() {
+		export3.start();
+		
+		// Test invalidity
+		assertTrue("Check invalidity - 0", export3.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 0", isFooServiceProvided());
+		assertEquals("Check number of provides - 0", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 1", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo2.start();
+		assertTrue("Check validity - 2", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 2);
+		assertTrue("Check invocation - 2", invoke(2));
+		
+		foo2.stop();
+		assertTrue("Check validity - 3", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 3", invoke(1));
+		
+		foo1.stop();
+		assertTrue("Check invalidity - 4", export3.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 5", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 5", isFooServiceProvided());
+		assertEquals("Check number of provides - 5", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 5", invoke(1));
+	}
+	
+	public void test3() {
+		foo1.start();
+		foo2.start();
+		
+		export3.start();
+		assertTrue("Check validity - 1", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 2);
+		assertTrue("Check invocation - 1", invoke(2));
+		
+		foo1.stop();
+		assertTrue("Check validity - 2", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke(1));
+		
+		foo2.stop();
+		assertTrue("Check invalidity - 3", export3.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 4", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 4", invoke(1));
+	}
+	
+	public void test4() {
+		foo1.start();
+		foo2.start();
+		
+		export3.start();
+		assertTrue("Check validity - 1", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 2);
+		assertTrue("Check invocation - 1", invoke(2));
+		
+		foo2.stop();
+		assertTrue("Check validity - 2", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke(1));
+		
+		foo1.stop();
+		assertTrue("Check invalidity - 3", export3.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 0);
+		
+		foo2.start();
+		assertTrue("Check validity - 4", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 4", invoke(1));
+	}
+	
+	
+	
+	private boolean isFooServiceProvided() {
+		ServiceReference ref = Utils.getServiceReferenceByName(context, BazService.class.getName(), export3.getInstanceName());
+		return ref != null;
+	}
+	
+	private int countFooServiceProvided() {
+		ServiceReference[] refs = Utils.getServiceReferences(context, BazService.class.getName(), "(instance.name="+export3.getInstanceName()+")");
+		return refs.length;
+	}
+	
+	private boolean invoke() {
+		ServiceReference ref = Utils.getServiceReferenceByName(context, BazService.class.getName(), export3.getInstanceName());
+		if(ref == null) { return false; }
+		BazService fs = (BazService) context.getService(ref);
+		context.ungetService(ref);
+		return fs.foo();
+	}
+	
+	private boolean invoke(int nb) {
+		ServiceReference[] refs = Utils.getServiceReferences(context, BazService.class.getName(), "(instance.name="+export3.getInstanceName()+")");
+		if(refs == null) { return false; }
+		if (nb > refs.length) { return false; }
+		for(int i = 0; i < nb; i++) {
+			BazService fs = (BazService) context.getService(refs[i]);
+			context.ungetService(refs[i]);
+			if(!fs.foo()) { return false; }
+		}
+		return true;
+	}
+	
+	
+	
+	
+	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalExport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalExport.java
new file mode 100644
index 0000000..4f78f49
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalExport.java
@@ -0,0 +1,234 @@
+/* 
+ * 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.exporter;
+
+import java.util.Properties;
+
+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.osgi.framework.ServiceReference;
+
+public class OptionalExport extends OSGiTestCase {
+	
+	ComponentInstance export2;
+	Factory fooProvider;
+	ComponentInstance foo1 = null, foo2 = null;
+
+	public void setUp() {
+		fooProvider = Utils.getFactoryByName(context, "BazProviderType");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p1 = new Properties();
+		p1.put("name", "foo1");
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		
+		try {
+			foo1 = fooProvider.createComponentInstance(p1);
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to create foos : " + e.getMessage());
+		}
+		
+		foo1.stop();
+		foo2.stop();
+		
+		Factory factory = Utils.getFactoryByName(context, "composite.export.2");
+		Properties props = new Properties();
+		props.put("name", "export");
+		try {
+			export2 = factory.createComponentInstance(props);
+		} catch(Exception e) {
+			fail("Fail to instantiate exporter " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		foo1.dispose();
+		foo2.dispose();
+		export2.dispose();
+		foo1 = null;
+		foo2 = null;
+		export2 = null;
+	}
+	
+	public void test1() {
+		export2.start();
+		
+		// Check that no foo service are available
+		assertEquals("Check no foo service", Utils.getServiceReferences(context, FooService.class.getName(), null).length, 0);
+		
+		// Test validity
+		assertTrue("Check validity - 0", export2.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 0", isFooServiceProvided());
+		assertEquals("Check number of provides - 0", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 1", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo2.start();
+		assertTrue("Check validity - 2", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke());
+		
+		foo1.stop();
+		assertTrue("Check validity - 3", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3 ("+countFooServiceProvided()+")", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 3", invoke());
+		
+		foo2.stop();
+		assertTrue("Check validity - 4", export2.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 0);
+		
+		foo2.start();
+		assertTrue("Check validity - 5", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 5", isFooServiceProvided());
+		assertEquals("Check number of provides - 5", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 5", invoke());
+	}
+	
+	public void test2() {
+		export2.start();
+		
+		// Test invalidity
+		assertTrue("Check validity - 0", export2.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 0", isFooServiceProvided());
+		assertEquals("Check number of provides - 0", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 1", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo2.start();
+		assertTrue("Check validity - 2", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke());
+		
+		foo2.stop();
+		assertTrue("Check validity - 3", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 3", invoke());
+		
+		foo1.stop();
+		assertTrue("Check validity - 4", export2.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 5", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 5", isFooServiceProvided());
+		assertEquals("Check number of provides - 5", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 5", invoke());
+	}
+	
+	public void test3() {
+		foo1.start();
+		foo2.start();
+		
+		export2.start();
+		assertTrue("Check validity - 1", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo1.stop();
+		assertTrue("Check validity - 2", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke());
+		
+		foo2.stop();
+		assertTrue("Check validity - 3", export2.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 4", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 4", invoke());
+	}
+	
+	public void test4() {
+		foo1.start();
+		foo2.start();
+		
+		export2.start();
+		assertTrue("Check validity - 1", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo2.stop();
+		assertTrue("Check validity - 2", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke());
+		
+		foo1.stop();
+		assertTrue("Check validity - 3", export2.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 0);
+		
+		foo2.start();
+		assertTrue("Check validity - 4", export2.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 4", invoke());
+	}
+	
+	
+	
+	private boolean isFooServiceProvided() {
+		ServiceReference ref = Utils.getServiceReferenceByName(context, BazService.class.getName(), export2.getInstanceName());
+		return ref != null;
+	}
+	
+	private int countFooServiceProvided() {
+		ServiceReference[] refs = Utils.getServiceReferences(context, BazService.class.getName(), "(instance.name="+export2.getInstanceName()+")");
+		return refs.length;
+	}
+	
+	private boolean invoke() {
+		ServiceReference ref = Utils.getServiceReferenceByName(context, BazService.class.getName(), export2.getInstanceName());
+		if(ref == null) { return false; }
+		BazService fs = (BazService) context.getService(ref);
+		return fs.foo();
+	}
+	
+	
+	
+	
+	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalMultipleExport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalMultipleExport.java
new file mode 100644
index 0000000..a285ef0
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/OptionalMultipleExport.java
@@ -0,0 +1,247 @@
+/* 
+ * 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.exporter;
+
+import java.util.Properties;
+
+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.osgi.framework.ServiceReference;
+
+public class OptionalMultipleExport extends OSGiTestCase {
+	
+	ComponentInstance export3;
+	Factory fooProvider;
+	ComponentInstance foo1 = null, foo2 = null;
+
+	public void setUp() {
+		fooProvider = Utils.getFactoryByName(context, "BazProviderType");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p1 = new Properties();
+		p1.put("name", "foo1");
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		
+		try {
+			foo1 = fooProvider.createComponentInstance(p1);
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to create foos : " + e.getMessage());
+		}
+		
+		foo1.stop();
+		foo2.stop();
+		
+		Factory factory = Utils.getFactoryByName(context, "composite.export.4");
+		Properties props = new Properties();
+		props.put("name", "export");
+		try {
+			export3 = factory.createComponentInstance(props);
+		} catch(Exception e) {
+			fail("Fail to instantiate exporter " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		foo1.dispose();
+		foo2.dispose();
+		export3.dispose();
+		foo1 = null;
+		foo2 = null;
+		export3 = null;
+	}
+	
+	public void test1() {
+		export3.start();
+		
+		// Check that no foo service are available
+		assertEquals("Check no foo service", Utils.getServiceReferences(context, FooService.class.getName(), null).length, 0);
+		
+		// Test invalidity
+		assertTrue("Check validity - 0", export3.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 0", isFooServiceProvided());
+		assertEquals("Check number of provides - 0", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 1", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke(1));
+		
+		foo2.start();
+		assertTrue("Check validity - 2", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 2);
+		assertTrue("Check invocation - 2", invoke(2));
+		
+		foo1.stop();
+		assertTrue("Check validity - 3", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3 ("+countFooServiceProvided()+")", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 3", invoke(1));
+		
+		foo2.stop();
+		assertTrue("Check validity - 4", export3.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 0);
+		
+		foo2.start();
+		assertTrue("Check validity - 5", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 5", isFooServiceProvided());
+		assertEquals("Check number of provides - 5", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 5", invoke(1));
+	}
+	
+	public void test2() {
+		export3.start();
+		
+		// Test invalidity
+		assertTrue("Check validity - 0", export3.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 0", isFooServiceProvided());
+		assertEquals("Check number of provides - 0", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 1", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo2.start();
+		assertTrue("Check validity - 2", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 2);
+		assertTrue("Check invocation - 2", invoke(2));
+		
+		foo2.stop();
+		assertTrue("Check validity - 3", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 3", invoke(1));
+		
+		foo1.stop();
+		assertTrue("Check validity - 4", export3.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 5", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 5", isFooServiceProvided());
+		assertEquals("Check number of provides - 5", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 5", invoke(1));
+	}
+	
+	public void test3() {
+		foo1.start();
+		foo2.start();
+		
+		export3.start();
+		assertTrue("Check validity - 1", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 2);
+		assertTrue("Check invocation - 1", invoke(2));
+		
+		foo1.stop();
+		assertTrue("Check validity - 2", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke(1));
+		
+		foo2.stop();
+		assertTrue("Check validity - 3", export3.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 4", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 4", invoke(1));
+	}
+	
+	public void test4() {
+		foo1.start();
+		foo2.start();
+		
+		export3.start();
+		assertTrue("Check validity - 1", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 2);
+		assertTrue("Check invocation - 1", invoke(2));
+		
+		foo2.stop();
+		assertTrue("Check validity - 2", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke(1));
+		
+		foo1.stop();
+		assertTrue("Check validity - 3", export3.getState() == ComponentInstance.VALID);
+		assertFalse("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 0);
+		
+		foo2.start();
+		assertTrue("Check validity - 4", export3.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 4", invoke(1));
+	}
+	
+	
+	
+	private boolean isFooServiceProvided() {
+		ServiceReference ref = Utils.getServiceReferenceByName(context, BazService.class.getName(), export3.getInstanceName());
+		return ref != null;
+	}
+	
+	private int countFooServiceProvided() {
+		ServiceReference[] refs = Utils.getServiceReferences(context, BazService.class.getName(), "(instance.name="+export3.getInstanceName()+")");
+		return refs.length;
+	}
+	
+	private boolean invoke() {
+		ServiceReference ref = Utils.getServiceReferenceByName(context, BazService.class.getName(), export3.getInstanceName());
+		if(ref == null) { return false; }
+		BazService fs = (BazService) context.getService(ref);
+		context.ungetService(ref);
+		return fs.foo();
+	}
+	
+	private boolean invoke(int nb) {
+		ServiceReference[] refs = Utils.getServiceReferences(context, BazService.class.getName(), "(instance.name="+export3.getInstanceName()+")");
+		if(refs == null) { return false; }
+		if (nb > refs.length) { return false; }
+		for(int i = 0; i < nb; i++) {
+			BazService fs = (BazService) context.getService(refs[i]);
+			context.ungetService(refs[i]);
+			if(!fs.foo()) { return false; }
+		}
+		return true;
+	}
+	
+	
+	
+	
+	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/SimpleExport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/SimpleExport.java
new file mode 100644
index 0000000..b0bf922
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/exporter/SimpleExport.java
@@ -0,0 +1,234 @@
+/* 
+ * 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.exporter;
+
+import java.util.Properties;
+
+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.osgi.framework.ServiceReference;
+
+public class SimpleExport extends OSGiTestCase {
+	
+	ComponentInstance export1;
+	Factory fooProvider;
+	ComponentInstance foo1 = null, foo2 = null;
+
+	public void setUp() {
+		fooProvider = Utils.getFactoryByName(context, "BazProviderType");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p1 = new Properties();
+		p1.put("name", "foo1");
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		
+		try {
+			foo1 = fooProvider.createComponentInstance(p1);
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to create foos : " + e.getMessage());
+		}
+		
+		foo1.stop();
+		foo2.stop();
+		
+		Factory factory = Utils.getFactoryByName(context, "composite.export.1");
+		Properties props = new Properties();
+		props.put("name", "export");
+		try {
+			export1 = factory.createComponentInstance(props);
+		} catch(Exception e) {
+			fail("Fail to instantiate exporter " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		foo1.dispose();
+		foo2.dispose();
+		export1.dispose();
+		foo1 = null;
+		foo2 = null;
+		export1 = null;
+	}
+	
+	public void test1() {
+		export1.start();
+		
+		// Check that no foo service are available
+		assertEquals("Check no foo service", Utils.getServiceReferences(context, FooService.class.getName(), null).length, 0);
+		
+		// Test invalidity
+		assertTrue("Check invalidity - 0", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 0", isFooServiceProvided());
+		assertEquals("Check number of provides - 0", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 1", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo2.start();
+		assertTrue("Check validity - 2", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke());
+		
+		foo1.stop();
+		assertTrue("Check validity - 3", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3 ("+countFooServiceProvided()+")", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 3", invoke());
+		
+		foo2.stop();
+		assertTrue("Check invalidity - 4", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 0);
+		
+		foo2.start();
+		assertTrue("Check validity - 5", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 5", isFooServiceProvided());
+		assertEquals("Check number of provides - 5", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 5", invoke());
+	}
+	
+	public void test2() {
+		export1.start();
+		
+		// Test invalidity
+		assertTrue("Check invalidity - 0", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 0", isFooServiceProvided());
+		assertEquals("Check number of provides - 0", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 1", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo2.start();
+		assertTrue("Check validity - 2", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke());
+		
+		foo2.stop();
+		assertTrue("Check validity - 3", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 3", invoke());
+		
+		foo1.stop();
+		assertTrue("Check invalidity - 4", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 5", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 5", isFooServiceProvided());
+		assertEquals("Check number of provides - 5", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 5", invoke());
+	}
+	
+	public void test3() {
+		foo1.start();
+		foo2.start();
+		
+		export1.start();
+		assertTrue("Check validity - 1", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo1.stop();
+		assertTrue("Check validity - 2", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke());
+		
+		foo2.stop();
+		assertTrue("Check invalidity - 3", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 0);
+		
+		foo1.start();
+		assertTrue("Check validity - 4", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 4", invoke());
+	}
+	
+	public void test4() {
+		foo1.start();
+		foo2.start();
+		
+		export1.start();
+		assertTrue("Check validity - 1", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 1", isFooServiceProvided());
+		assertEquals("Check number of provides - 1", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 1", invoke());
+		
+		foo2.stop();
+		assertTrue("Check validity - 2", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 2", isFooServiceProvided());
+		assertEquals("Check number of provides - 2", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 2", invoke());
+		
+		foo1.stop();
+		assertTrue("Check invalidity - 3", export1.getState() == ComponentInstance.INVALID);
+		assertFalse("Check providing - 3", isFooServiceProvided());
+		assertEquals("Check number of provides - 3", countFooServiceProvided(), 0);
+		
+		foo2.start();
+		assertTrue("Check validity - 4", export1.getState() == ComponentInstance.VALID);
+		assertTrue("Check providing - 4", isFooServiceProvided());
+		assertEquals("Check number of provides - 4", countFooServiceProvided(), 1);
+		assertTrue("Check invocation - 4", invoke());
+	}
+	
+	
+	
+	private boolean isFooServiceProvided() {
+		ServiceReference ref = Utils.getServiceReferenceByName(context, BazService.class.getName(), export1.getInstanceName());
+		return ref != null;
+	}
+	
+	private int countFooServiceProvided() {
+		ServiceReference[] refs = Utils.getServiceReferences(context, BazService.class.getName(), "(instance.name="+export1.getInstanceName()+")");
+		return refs.length;
+	}
+	
+	private boolean invoke() {
+		ServiceReference ref = Utils.getServiceReferenceByName(context, BazService.class.getName(), export1.getInstanceName());
+		if(ref == null) { return false; }
+		BazService fs = (BazService) context.getService(ref);
+		return fs.foo();
+	}
+	
+	
+	
+	
+	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedFilteredImport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedFilteredImport.java
new file mode 100644
index 0000000..1466677
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedFilteredImport.java
@@ -0,0 +1,150 @@
+/* 
+ * 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.importer;
+
+import java.util.Properties;
+
+import org.apache.felix.ipojo.ComponentInstance;
+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.osgi.framework.ServiceReference;
+
+public class DelayedFilteredImport extends OSGiTestCase {
+	
+	ComponentInstance import1;
+	Factory fooProvider;
+	ComponentInstance foo1, foo2;
+
+	public void setUp() {
+		
+		Properties p = new Properties();
+		p.put("name", "importer");
+		Factory compFact = Utils.getFactoryByName(context, "composite.requires.1");
+		try {
+			import1 = compFact.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Cannot instantiate the component : " + e.getMessage());
+		}
+		
+		import1.stop();
+		
+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p1 = new Properties();
+		p1.put("name", "foo1");
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo1 = fooProvider.createComponentInstance(p1);
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Cannot instantiate foo providers : " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		foo1.dispose();
+		foo2.dispose();
+		import1.dispose();
+		foo1 = null;
+		foo2 = null;
+		import1 = null;
+	}
+	
+	public void testSimple() {
+		import1.start(); 
+		//Two providers
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import1);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo1.stop();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo2.stop();		
+		assertTrue("Test component invalidity - 2", import1.getState() == ComponentInstance.INVALID);
+		
+		foo2.start();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}
+	
+	public void testSimple2() {
+		import1.start(); 
+		//Two providers
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import1);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo2.stop();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo1.stop();		
+		assertTrue("Test component invalidity - 2", import1.getState() == ComponentInstance.INVALID);
+		
+		foo1.start();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}
+	
+	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedMultipleImport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedMultipleImport.java
new file mode 100644
index 0000000..47688ee
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedMultipleImport.java
@@ -0,0 +1,156 @@
+/* 
+ * 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.importer;
+
+import java.util.Properties;
+
+import org.apache.felix.ipojo.ComponentInstance;
+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.osgi.framework.ServiceReference;
+
+public class DelayedMultipleImport extends OSGiTestCase {
+	
+	ComponentInstance import2;
+	Factory fooProvider;
+	ComponentInstance foo1, foo2;
+
+	public void setUp() {
+		
+		Properties p = new Properties();
+		p.put("name", "importer");
+		Factory compFact = Utils.getFactoryByName(context, "composite.requires.2");
+		try {
+			import2 = compFact.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Cannot instantiate the component : " + e.getMessage());
+		}
+		
+		import2.stop();
+		
+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p1 = new Properties();
+		p1.put("name", "foo1");
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo1 = fooProvider.createComponentInstance(p1);
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Cannot instantiate foo providers : " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		foo1.dispose();
+		foo2.dispose();
+		import2.dispose();
+		foo1 = null;
+		foo2 = null;
+		import2 = null;
+	}
+	
+	public void testSimple() {
+		import2.start(); 
+		//Two providers
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import2);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 2);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		fs = (FooService) sc.getService(refs[1]);
+		assertTrue("Test foo invocation (2)", fs.foo());
+		sc.ungetService(refs[1]);
+		
+		foo1.stop();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo2.stop();		
+		assertTrue("Test component invalidity - 2", import2.getState() == ComponentInstance.INVALID);
+		
+		foo2.start();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}
+	
+	public void testSimple2() {
+		import2.start(); 
+		//Two providers
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import2);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 2);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		fs = (FooService) sc.getService(refs[1]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[1]);
+		
+		foo2.stop();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo1.stop();		
+		assertTrue("Test component invalidity - 2", import2.getState() == ComponentInstance.INVALID);
+		
+		foo1.start();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}
+	
+	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalImport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalImport.java
new file mode 100644
index 0000000..6e36797
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalImport.java
@@ -0,0 +1,156 @@
+/* 
+ * 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.importer;
+
+import java.util.Properties;
+
+import org.apache.felix.ipojo.ComponentInstance;
+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.osgi.framework.ServiceReference;
+
+public class DelayedOptionalImport extends OSGiTestCase {
+	
+	ComponentInstance import3;
+	Factory fooProvider;
+	ComponentInstance foo1, foo2;
+
+	public void setUp() {
+		
+		Properties p = new Properties();
+		p.put("name", "importer");
+		Factory compFact = Utils.getFactoryByName(context, "composite.requires.3");
+		try {
+			import3 = compFact.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Cannot instantiate the component : " + e.getMessage());
+		}
+		
+		import3.stop();
+		
+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p1 = new Properties();
+		p1.put("name", "foo1");
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo1 = fooProvider.createComponentInstance(p1);
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Cannot instantiate foo providers : " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		foo1.dispose();
+		foo2.dispose();
+		import3.dispose();
+		foo1 = null;
+		foo2 = null;
+		import3 = null;
+	}
+	
+	public void testSimple() {
+		import3.start(); 
+		//Two providers
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import3);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo1.stop();
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import3);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo2.stop();		
+		assertTrue("Test component validity - 2", import3.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import3);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertEquals("Test foo non-availability inside the composite - 3.1", refs.length, 0);
+		
+		foo2.start();
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import3);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}
+	
+	public void testSimple2() {
+		import3.start(); 
+		//Two providers
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import3);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo2.stop();
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import3);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo1.stop();		
+		assertTrue("Test component validity - 2", import3.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import3);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 0);
+		
+		foo1.start();
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import3);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}
+	
+	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalMultipleImport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalMultipleImport.java
new file mode 100644
index 0000000..0dac390
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedOptionalMultipleImport.java
@@ -0,0 +1,162 @@
+/* 
+ * 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.importer;
+
+import java.util.Properties;
+
+import org.apache.felix.ipojo.ComponentInstance;
+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.osgi.framework.ServiceReference;
+
+public class DelayedOptionalMultipleImport extends OSGiTestCase {
+	
+	ComponentInstance import4;
+	Factory fooProvider;
+	ComponentInstance foo1, foo2;
+
+	public void setUp() {
+		
+		Properties p = new Properties();
+		p.put("name", "importer");
+		Factory compFact = Utils.getFactoryByName(context, "composite.requires.4");
+		try {
+			import4 = compFact.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Cannot instantiate the component : " + e.getMessage());
+		}
+		
+		import4.stop();
+		
+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p1 = new Properties();
+		p1.put("name", "foo1");
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo1 = fooProvider.createComponentInstance(p1);
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Cannot instantiate foo providers : " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		foo1.dispose();
+		foo2.dispose();
+		import4.dispose();
+		foo1 = null;
+		foo2 = null;
+		import4 = null;
+	}
+	
+	public void testSimple() {
+		import4.start(); 
+		//Two providers
+		assertTrue("Test component validity", import4.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import4);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 2);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		fs = (FooService) sc.getService(refs[1]);
+		assertTrue("Test foo invocation (2)", fs.foo());
+		sc.ungetService(refs[1]);
+		
+		foo1.stop();
+		assertTrue("Test component validity", import4.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import4);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo2.stop();		
+		assertTrue("Test component validity - 2", import4.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import4);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertEquals("Test foo availability inside the composite - 1", refs.length, 0);
+		
+		foo2.start();
+		assertTrue("Test component validity", import4.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import4);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}
+	
+	public void testSimple2() {
+		import4.start(); 
+		//Two providers
+		assertTrue("Test component validity", import4.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import4);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 2);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		fs = (FooService) sc.getService(refs[1]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[1]);
+		
+		foo2.stop();
+		assertTrue("Test component validity", import4.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import4);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo1.stop();		
+		assertTrue("Test component validity - 2", import4.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import4);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertEquals("Test foo availability inside the composite - 1", refs.length, 0);
+		
+		foo1.start();
+		assertTrue("Test component validity", import4.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import4);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}
+	
+	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedSimpleImport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedSimpleImport.java
new file mode 100644
index 0000000..2d89ee8
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/DelayedSimpleImport.java
@@ -0,0 +1,151 @@
+/* 
+ * 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.importer;
+
+import java.util.Properties;
+
+import org.apache.felix.ipojo.ComponentInstance;
+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.osgi.framework.ServiceReference;
+
+public class DelayedSimpleImport extends OSGiTestCase {
+	
+	ComponentInstance import1;
+	Factory fooProvider;
+	ComponentInstance foo1, foo2;
+
+	public void setUp() {
+		
+		Properties p = new Properties();
+		p.put("name", "importer");
+		Factory compFact = Utils.getFactoryByName(context, "composite.requires.1");
+		try {
+			import1 = compFact.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Cannot instantiate the component : " + e.getMessage());
+		}
+		
+		import1.stop();
+		
+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p1 = new Properties();
+		p1.put("name", "foo1");
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo1 = fooProvider.createComponentInstance(p1);
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Cannot instantiate foo providers : " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		foo1.dispose();
+		foo2.dispose();
+		import1.dispose();
+		foo1 = null;
+		foo2 = null;
+		import1 = null;
+	}
+	
+	public void testSimple() {
+        import1.start();
+
+		//Two providers
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import1);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo1.stop();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 2", refs);
+		assertEquals("Test foo availability inside the composite - 2.2", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo2.stop();		
+		assertTrue("Test component invalidity - 2", import1.getState() == ComponentInstance.INVALID);
+		
+		foo2.start();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}
+	
+	public void testSimple2() {
+		import1.start(); 
+		//Two providers
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import1);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo2.stop();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo1.stop();		
+		assertTrue("Test component invalidity - 2", import1.getState() == ComponentInstance.INVALID);
+		
+		foo1.start();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}
+	
+	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/FilteredImport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/FilteredImport.java
new file mode 100644
index 0000000..221ecda
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/FilteredImport.java
@@ -0,0 +1,147 @@
+/* 
+ * 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.importer;
+
+import java.util.Properties;
+
+import org.apache.felix.ipojo.ComponentInstance;
+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.osgi.framework.ServiceReference;
+
+public class FilteredImport extends OSGiTestCase {
+	
+	ComponentInstance import1;
+	Factory fooProvider;
+	Factory fooProvider2;
+	
+	ComponentInstance foo1, foo2;
+
+	public void setUp() {
+		Properties p = new Properties();
+		p.put("name", "importer");
+		Factory compFact = Utils.getFactoryByName(context, "composite.requires.5");
+		try {
+			import1 = compFact.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Cannot instantiate the component : " + e.getMessage());
+		}
+		import1.stop();
+		
+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		fooProvider2 = Utils.getFactoryByName(context, "COMPO-FooProviderType-2");
+		assertNotNull("Check fooProvider availability", fooProvider2);
+		
+		Properties p1 = new Properties();
+		p1.put("name", "foo1");
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo1 = fooProvider.createComponentInstance(p1);
+			foo2 = fooProvider2.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Cannot instantiate foo providers : " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		foo1.dispose();
+		foo2.dispose();
+		import1.dispose();
+		foo1 = null;
+		foo2 = null;
+		import1 = null;
+	}
+	
+	public void testSimple() {
+		import1.start(); 
+		//Two providers
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import1);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo1.stop();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo2.stop();		
+		assertTrue("Test component invalidity - 2", import1.getState() == ComponentInstance.INVALID);
+		
+		foo2.start();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}
+	
+	public void testSimple2() {
+		import1.start(); 
+		//Two providers
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import1);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo2.stop();
+		assertTrue("Test component invalidity - 1", import1.getState() == ComponentInstance.INVALID);
+		
+		// Stop the second provider
+		foo1.stop();		
+		assertTrue("Test component invalidity - 2", import1.getState() == ComponentInstance.INVALID);
+		
+		foo1.start();
+		assertTrue("Test component invalidity - 3", import1.getState() == ComponentInstance.INVALID);
+		
+		foo2.start();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+	}	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/ImportTestSuite.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/ImportTestSuite.java
new file mode 100644
index 0000000..2f25b2c
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/ImportTestSuite.java
@@ -0,0 +1,43 @@
+/* 
+ * 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.importer;
+
+import junit.framework.Test;
+
+import org.apache.felix.ipojo.junit4osgi.OSGiTestSuite;
+import org.osgi.framework.BundleContext;
+
+public class ImportTestSuite {
+
+	public static Test suite(BundleContext bc) {
+	    OSGiTestSuite ots = new OSGiTestSuite("Composite Import Test Suite", bc);
+	    ots.addTestSuite(SimpleImport.class);
+	    ots.addTestSuite(DelayedSimpleImport.class);
+	    ots.addTestSuite(OptionalImport.class);
+	    ots.addTestSuite(DelayedOptionalImport.class);
+	    ots.addTestSuite(MultipleImport.class);
+	    ots.addTestSuite(DelayedMultipleImport.class);
+	    ots.addTestSuite(OptionalMultipleImport.class);
+	    ots.addTestSuite(DelayedOptionalMultipleImport.class);
+	    ots.addTestSuite(FilteredImport.class);
+	    ots.addTestSuite(DelayedFilteredImport.class);
+		return ots;
+	}
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/MultipleImport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/MultipleImport.java
new file mode 100644
index 0000000..c8eedce
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/MultipleImport.java
@@ -0,0 +1,190 @@
+/* 
+ * 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.importer;
+
+import java.util.Properties;
+
+import org.apache.felix.ipojo.ComponentInstance;
+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.osgi.framework.ServiceReference;
+
+public class MultipleImport extends OSGiTestCase {
+	
+	ComponentInstance import2;
+	Factory fooProvider;
+
+	public void setUp() {
+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p = new Properties();
+		p.put("name", "importer");
+		Factory compFact = Utils.getFactoryByName(context, "composite.requires.2");
+		try {
+			import2 = compFact.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Cannot instantiate the component : " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		import2.dispose();
+		import2 = null;
+	}
+	
+	public void testSimple() {
+		// No provider -> Invalid
+		assertTrue("Test component invalidity", import2.getState() == ComponentInstance.INVALID);
+		
+		ComponentInstance foo = null;
+		Properties p = new Properties();
+		p.put("name", "foo");
+		try {
+			foo = fooProvider.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo component " + e.getMessage());
+		}
+		
+		ComponentInstance foo2 = null;
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo2 component " + e.getMessage());
+		}
+		
+		// The foo service is available => import1 must be valid
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import2);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2 ("+refs.length+")", refs.length, 2);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		FooService fs2 = (FooService) sc.getService(refs[1]);
+		assertTrue("Test foo invocation", fs2.foo());
+		sc.ungetService(refs[0]);
+		sc.ungetService(refs[1]);
+		
+		// Stop the second provider
+		foo2.dispose();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 2", refs);
+		assertEquals("Test foo availability inside the composite - 2.1 ("+refs.length+")", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// stop the foo provider
+		foo.stop();
+		
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 2", import2.getState() == ComponentInstance.INVALID);
+		
+		foo.start();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo.dispose(); 
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 3", import2.getState() == ComponentInstance.INVALID);
+	}
+	
+	public void testSimple2() {
+		// No provider -> Invalid
+		assertTrue("Test component invalidity", import2.getState() == ComponentInstance.INVALID);
+		
+		ComponentInstance foo1 = null;
+		Properties p = new Properties();
+		p.put("name", "foo");
+		try {
+			foo1 = fooProvider.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo component " + e.getMessage());
+		}
+		
+		ComponentInstance foo2 = null;
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo2 component " + e.getMessage());
+		}
+		
+		// The foo service is available => import1 must be valid
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import2);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2 ("+refs.length+")", refs.length, 2);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		FooService fs2 = (FooService) sc.getService(refs[1]);
+		assertTrue("Test foo invocation", fs2.foo());
+		sc.ungetService(refs[0]);
+		sc.ungetService(refs[1]);
+		
+		// Stop the first provider
+		foo1.stop();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 2", refs);
+		assertEquals("Test foo availability inside the composite - 2.1 ("+refs.length+")", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// stop the second foo provider
+		foo2.dispose();
+		
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 2", import2.getState() == ComponentInstance.INVALID);
+		
+		foo1.start();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo1.dispose(); 
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 3", import2.getState() == ComponentInstance.INVALID);
+	}
+
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalImport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalImport.java
new file mode 100644
index 0000000..0fb3f89
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalImport.java
@@ -0,0 +1,184 @@
+/* 
+ * 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.importer;
+
+import java.util.Properties;
+
+import org.apache.felix.ipojo.ComponentInstance;
+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.osgi.framework.ServiceReference;
+
+public class OptionalImport extends OSGiTestCase {
+	
+	ComponentInstance import3;
+	Factory fooProvider;
+
+	public void setUp() {
+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p = new Properties();
+		p.put("name", "importer");
+		Factory compFact = Utils.getFactoryByName(context, "composite.requires.3");
+		try {
+			import3 = compFact.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Cannot instantiate the component : " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		import3.dispose();
+		import3 = null;
+	}
+	
+	public void testSimple() {
+		// No provider -> valid
+		assertTrue("Test component invalidity", import3.getState() == ComponentInstance.VALID);
+		
+		ComponentInstance foo = null;
+		Properties p = new Properties();
+		p.put("name", "foo");
+		try {
+			foo = fooProvider.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo component " + e.getMessage());
+		}
+		
+		ComponentInstance foo2 = null;
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo2 component " + e.getMessage());
+		}
+		
+		// The foo service is available => import1 must be valid
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import3);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo2.dispose();
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import3);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 2", refs);
+		assertEquals("Test foo availability inside the composite - 2.1 ("+refs.length+")", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// stop the foo provider
+		foo.stop();
+		
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 2", import3.getState() == ComponentInstance.VALID);
+		
+		foo.start();
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import3);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo.dispose(); 
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 3", import3.getState() == ComponentInstance.VALID);
+	}
+	
+	public void testSimple2() {
+		// No provider -> valid
+		assertTrue("Test component invalidity", import3.getState() == ComponentInstance.VALID);
+		
+		ComponentInstance foo1 = null;
+		Properties p = new Properties();
+		p.put("name", "foo");
+		try {
+			foo1 = fooProvider.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo component " + e.getMessage());
+		}
+		
+		ComponentInstance foo2 = null;
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo2 component " + e.getMessage());
+		}
+		
+		// The foo service is available => import1 must be valid
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import3);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo1.stop();
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import3);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 2", refs);
+		assertEquals("Test foo availability inside the composite - 2.1 ("+refs.length+")", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// stop the foo provider
+		foo2.dispose();
+		
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 2", import3.getState() == ComponentInstance.VALID);
+		
+		foo1.start();
+		assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import3);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo1.dispose(); 
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 3", import3.getState() == ComponentInstance.VALID);
+	}
+
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalMultipleImport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalMultipleImport.java
new file mode 100644
index 0000000..a7c71b0
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/OptionalMultipleImport.java
@@ -0,0 +1,201 @@
+/* 
+ * 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.importer;
+
+import java.util.Properties;
+
+import org.apache.felix.ipojo.ComponentInstance;
+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.osgi.framework.ServiceReference;
+
+public class OptionalMultipleImport extends OSGiTestCase {
+	
+	ComponentInstance import2;
+	Factory fooProvider;
+
+	public void setUp() {
+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p = new Properties();
+		p.put("name", "importer");
+		Factory compFact = Utils.getFactoryByName(context, "composite.requires.4");
+		try {
+			import2 = compFact.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Cannot instantiate the component : " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		import2.dispose();
+		import2 = null;
+	}
+	
+	public void testSimple() {
+		// No provider -> valid
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		
+		ComponentInstance foo = null;
+		Properties p = new Properties();
+		p.put("name", "foo");
+		try {
+			foo = fooProvider.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo component " + e.getMessage());
+		}
+		
+		ComponentInstance foo2 = null;
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo2 component " + e.getMessage());
+		}
+		
+		// The foo service is available => import1 must be valid
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import2);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2 ("+refs.length+")", refs.length, 2);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		FooService fs2 = (FooService) sc.getService(refs[1]);
+		assertTrue("Test foo invocation", fs2.foo());
+		sc.ungetService(refs[0]);
+		sc.ungetService(refs[1]);
+		
+		// Stop the second provider
+		foo2.dispose();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 2", refs);
+		assertEquals("Test foo availability inside the composite - 2.1 ("+refs.length+")", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// stop the foo provider
+		foo.stop();
+		
+		// No provider -> valid
+		assertTrue("Test component validity - 2", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertEquals("Test foo non-availability inside the composite - 1", refs.length, 0);
+		
+		foo.start();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo.dispose(); 
+		// No provider -> Invalid
+		assertTrue("Test component validity - 3", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertEquals("Test foo non-availability inside the composite - 2", refs.length, 0);
+	}
+	
+	public void testSimple2() {
+		// No provider -> Invalid
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		
+		ComponentInstance foo1 = null;
+		Properties p = new Properties();
+		p.put("name", "foo");
+		try {
+			foo1 = fooProvider.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo component " + e.getMessage());
+		}
+		
+		ComponentInstance foo2 = null;
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo2 component " + e.getMessage());
+		}
+		
+		// The foo service is available => import1 must be valid
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import2);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2 ("+refs.length+")", refs.length, 2);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		FooService fs2 = (FooService) sc.getService(refs[1]);
+		assertTrue("Test foo invocation", fs2.foo());
+		sc.ungetService(refs[0]);
+		sc.ungetService(refs[1]);
+		
+		// Stop the first provider
+		foo1.stop();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 2", refs);
+		assertEquals("Test foo availability inside the composite - 2.1 ("+refs.length+")", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// stop the second foo provider
+		foo2.dispose();
+		
+		// No provider -> Invalid
+		assertTrue("Test component validity - 2", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertEquals("Test foo non-availability inside the composite - 1", refs.length, 0);
+		
+		foo1.start();
+		assertTrue("Test component validity", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo1.dispose(); 
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 3", import2.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import2);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertEquals("Test foo non-availability inside the composite - 2", refs.length, 0);
+	}
+
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/SimpleImport.java b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/SimpleImport.java
new file mode 100644
index 0000000..31f2b5a
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/java/org/apache/felix/ipojo/test/composite/importer/SimpleImport.java
@@ -0,0 +1,184 @@
+/* 
+ * 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.importer;
+
+import java.util.Properties;
+
+import org.apache.felix.ipojo.ComponentInstance;
+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.osgi.framework.ServiceReference;
+
+public class SimpleImport extends OSGiTestCase {
+	
+	ComponentInstance import1;
+	Factory fooProvider;
+
+	public void setUp() {
+		fooProvider = Utils.getFactoryByName(context, "COMPO-FooProviderType-1");
+		assertNotNull("Check fooProvider availability", fooProvider);
+		
+		Properties p = new Properties();
+		p.put("name", "importer");
+		Factory compFact = Utils.getFactoryByName(context, "composite.requires.1");
+		try {
+			import1 = compFact.createComponentInstance(p);
+		} catch(Exception e) {
+		    e.printStackTrace();
+			fail("Cannot instantiate the component : " + e.getMessage());
+		}
+	}
+	
+	public void tearDown() {
+		import1.dispose();
+		import1 = null;
+	}
+	
+	public void testSimple() {
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 0 ("+import1.getState()+")", import1.getState() == ComponentInstance.INVALID);
+		
+		ComponentInstance foo = null;
+		Properties p = new Properties();
+		p.put("name", "foo");
+		try {
+			foo = fooProvider.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo component " + e.getMessage());
+		}
+		
+		ComponentInstance foo2 = null;
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo2 component " + e.getMessage());
+		}
+		
+		// The foo service is available => import1 must be valid
+		assertTrue("Test component validity - 1", import1.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import1);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the second provider
+		foo2.dispose();
+		assertTrue("Test component validity - 2", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 2", refs);
+		assertEquals("Test foo availability inside the composite - 2.1 ("+refs.length+")", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// stop the foo provider
+		foo.stop();
+		
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 2", import1.getState() == ComponentInstance.INVALID);
+		
+		foo.start();
+		assertTrue("Test component validity - 3", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo.dispose(); 
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 3", import1.getState() == ComponentInstance.INVALID);
+	}
+	
+	public void testSimple2() {
+		// No provider -> Invalid
+		assertTrue("Test component invalidity", import1.getState() == ComponentInstance.INVALID);
+		
+		ComponentInstance foo1 = null;
+		Properties p = new Properties();
+		p.put("name", "foo");
+		try {
+			foo1 = fooProvider.createComponentInstance(p);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo component " + e.getMessage());
+		}
+		
+		ComponentInstance foo2 = null;
+		Properties p2 = new Properties();
+		p2.put("name", "foo2");
+		try {
+			foo2 = fooProvider.createComponentInstance(p2);
+		} catch(Exception e) {
+			fail("Fail to instantiate the foo2 component " + e.getMessage());
+		}
+		
+		// The foo service is available => import1 must be valid
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		ServiceContext sc = Utils.getServiceContext(import1);
+		ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 1", refs);
+		assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
+		FooService fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// Stop the first provider
+		foo1.stop();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 2", refs);
+		assertEquals("Test foo availability inside the composite - 2.1 ("+refs.length+")", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		// stop the second foo provider
+		foo2.dispose();
+		
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 2", import1.getState() == ComponentInstance.INVALID);
+		
+		foo1.start();
+		assertTrue("Test component validity", import1.getState() == ComponentInstance.VALID);
+		sc = Utils.getServiceContext(import1);
+		refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
+		assertNotNull("Test foo availability inside the composite - 3", refs);
+		assertEquals("Test foo availability inside the composite - 3.1", refs.length, 1);
+		fs = (FooService) sc.getService(refs[0]);
+		assertTrue("Test foo invocation", fs.foo());
+		sc.ungetService(refs[0]);
+		
+		foo1.dispose(); 
+		// No provider -> Invalid
+		assertTrue("Test component invalidity - 3", import1.getState() == ComponentInstance.INVALID);
+	}	
+
+}
diff --git a/ipojo/tests/tests.composite.service.import-export/src/main/resources/metadata.xml b/ipojo/tests/tests.composite.service.import-export/src/main/resources/metadata.xml
new file mode 100644
index 0000000..cb1e07f
--- /dev/null
+++ b/ipojo/tests/tests.composite.service.import-export/src/main/resources/metadata.xml
@@ -0,0 +1,82 @@
+<ipojo
+	xmlns:cs="org.apache.felix.ipojo.test.composite.handler.CheckServiceHandler">
+	<composite name="composite.requires.1" architecture="true">
+		<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.composite.service.FooService"
+			aggregate="true" scope="composite" />
+	</composite>
+
+	<composite name="composite.requires.3" architecture="true">
+		<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.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.composite.service.FooService"
+			filter="(&amp;(int=2)(long=40))" scope="composite" />
+	</composite>
+
+	<composite name="composite.export.1" architecture="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" />
+	</composite>
+
+	<composite name="composite.export.2" architecture="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.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.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.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>
+
+</ipojo>
