diff --git a/ipojo/tests/core/annotations/pom.xml b/ipojo/tests/core/annotations/pom.xml
index 1a1b0e1..d54fe9b 100644
--- a/ipojo/tests/core/annotations/pom.xml
+++ b/ipojo/tests/core/annotations/pom.xml
@@ -60,6 +60,14 @@
       <artifactId>org.apache.felix.ipojo.handler.eventadmin</artifactId>
       <version>${pom.version}</version>
     </dependency>
+    
+     <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.eventadmin</artifactId>
+      <version>1.0.0</version>
+      <scope>test</scope>
+    </dependency>
+    
   </dependencies>
 
   <build>
@@ -106,6 +114,25 @@
           </execution>
         </executions>
       </plugin>
+      
+      
+       <!-- <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-junit4osgi-plugin</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <configuration>
+              <org.osgi.http.port>8083</org.osgi.http.port>
+              </configuration>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>-->
     </plugins>
   </build>
 </project>
diff --git a/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/AnnotationsTestSuite.java b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/AnnotationsTestSuite.java
index dc7d880..c768413 100644
--- a/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/AnnotationsTestSuite.java
+++ b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/AnnotationsTestSuite.java
@@ -48,6 +48,8 @@
         ots.addTestSuite(Extender.class);
         ots.addTestSuite(EventAdmin.class);
 
+        // Instantiate
+        ots.addTestSuite(Instantiate.class);
 
         return ots;
     }
diff --git a/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/Instantiate.java b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/Instantiate.java
index 67c2d55..67c2e8f 100644
--- a/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/Instantiate.java
+++ b/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/Instantiate.java
@@ -9,6 +9,7 @@
 import org.apache.felix.ipojo.parser.ManifestMetadataParser;
 import org.apache.felix.ipojo.parser.ParseException;
 import org.osgi.framework.Bundle;
+import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 
 public class Instantiate extends OSGiTestCase {
@@ -20,7 +21,7 @@
     }
 
     public void testInstantiateSimple() {
-        Element[] meta = getInstanceMetadata(context.getBundle(), "org.apache.felix.ipojo.test.scenarios.component.Instantiate");
+        Element[] meta = getInstanceMetadata(context.getBundle(), "org.apache.felix.ipojo.test.scenarios.component.InstantiateSimple");
         assertNotNull(meta);
         assertEquals(1, meta.length);
         assertNull(meta[0].getAttribute("name"));
@@ -32,19 +33,22 @@
         Element[] meta = getInstanceMetadata(context.getBundle(), "org.apache.felix.ipojo.test.scenarios.component.InstantiateWithName");
         assertNotNull(meta);
         assertEquals(1, meta.length);
-        assertNull(meta[0].getAttribute("name"));
+        assertNotNull(meta[0].getAttribute("name"));
+        assertEquals("myInstantiatedInstance", meta[0].getAttribute("name"));
         assertEquals(0, meta[0].getElements().length);
     }
     
-    public void testInstanceCreation() {
-        String in = "org.apache.felix.ipojo.test.scenarios.component.Instantiate-0";
-        ServiceReference ref = helper.getServiceReferenceByName(Architecture.class.getName(), in);
+    public void testInstanceCreation() throws InvalidSyntaxException {
+        String in = "org.apache.felix.ipojo.test.scenarios.component.InstantiateSimple-0";
+        ServiceReference ref = helper.getServiceReferenceByName(org.apache.felix.ipojo.architecture.Architecture.class.getName(), 
+                in);
         assertNotNull(ref);
     }
     
     public void testInstanceCreationWithName() {
         String in = "myInstantiatedInstance";
-        ServiceReference ref = helper.getServiceReferenceByName(Architecture.class.getName(), in);
+        ServiceReference ref = helper.getServiceReferenceByName(org.apache.felix.ipojo.architecture.Architecture.class.getName(), 
+                in);
         assertNotNull(ref);
     }
 
@@ -70,7 +74,7 @@
 
         // Parses the retrieved description and find the component with the
         // given name.
-        List list = new ArrayList();
+        List<Element> list = new ArrayList<Element>();
         try {
             Element element = ManifestMetadataParser.parseHeaderMetadata(elem);
             Element[] childs = element.getElements("instance");
diff --git a/ipojo/tests/core/service-dependency-filter/pom.xml b/ipojo/tests/core/service-dependency-filter/pom.xml
index 46a28ba..2b9e8e9 100644
--- a/ipojo/tests/core/service-dependency-filter/pom.xml
+++ b/ipojo/tests/core/service-dependency-filter/pom.xml
@@ -1,104 +1,122 @@
 <!--
-	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
+  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
+  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.
+  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 Service Dependency (Filter) Test Suite</name>
-	<artifactId>tests.core.service.dependency.filter</artifactId>
-	<groupId>ipojo.tests</groupId>
-	<version>1.5.0-SNAPSHOT</version>
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.felix</groupId>
-			<artifactId>org.apache.felix.ipojo</artifactId>
-			<version>${pom.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.felix</groupId>
-			<artifactId>org.apache.felix.ipojo.metadata</artifactId>
-			<version>${pom.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.felix</groupId>
-			<artifactId>org.osgi.core</artifactId>
-			<version>1.0.1</version>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>3.8.1</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.felix</groupId>
-			<artifactId>org.apache.felix.ipojo.junit4osgi</artifactId>
-			<version>1.1.0-SNAPSHOT</version>
-		</dependency>
-		<dependency>
-			<groupId>ipojo.tests</groupId>
-			<artifactId>tests.core.service.dependency</artifactId>
-			<version>${pom.version}</version>
-		</dependency>
-	</dependencies>
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-bundle-plugin</artifactId>
-				<version>1.4.3</version>
-				<extensions>true</extensions>
-				<configuration>
-					<instructions>
-						<Bundle-SymbolicName>
-							${pom.artifactId}
-						</Bundle-SymbolicName>
-						<Private-Package>
-							org.apache.felix.ipojo.test.scenarios.service.dependency.filter, org.apache.felix.ipojo.test.scenarios.service.dependency.filter.component, org.apache.felix.ipojo.test.scenarios.util
-						</Private-Package>
-						<Test-Suite>
-							org.apache.felix.ipojo.test.scenarios.service.dependency.filter.FilteredDependencyTestSuite
-						</Test-Suite>
-					</instructions>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-ipojo-plugin</artifactId>
-				<version>${pom.version}</version>
-				<executions>
-					<execution>
-						<goals>
-							<goal>ipojo-bundle</goal>
-						</goals>
-						<configuration>
-							<ignoreAnnotations>true</ignoreAnnotations>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<source>1.4</source>
-					<target>1.4</target>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
+  <modelVersion>4.0.0</modelVersion>
+  <packaging>bundle</packaging>
+  <name>iPOJO Service Dependency (Filter) Test Suite</name>
+  <artifactId>tests.core.service.dependency.filter</artifactId>
+  <groupId>ipojo.tests</groupId>
+  <version>1.5.0-SNAPSHOT</version>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.ipojo</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.ipojo.metadata</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>1.0.1</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.ipojo.junit4osgi</artifactId>
+      <version>1.1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>ipojo.tests</groupId>
+      <artifactId>tests.core.service.dependency</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>1.4.3</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>
+              ${pom.artifactId}
+            </Bundle-SymbolicName>
+            <Private-Package>
+              org.apache.felix.ipojo.test.scenarios.service.dependency.filter, org.apache.felix.ipojo.test.scenarios.service.dependency.filter.component, org.apache.felix.ipojo.test.scenarios.util
+            </Private-Package>
+            <Test-Suite>
+              org.apache.felix.ipojo.test.scenarios.service.dependency.filter.FilteredDependencyTestSuite
+            </Test-Suite>
+          </instructions>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-ipojo-plugin</artifactId>
+        <version>${pom.version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>ipojo-bundle</goal>
+            </goals>
+            <configuration>
+              <ignoreAnnotations>true</ignoreAnnotations>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.4</source>
+          <target>1.4</target>
+        </configuration>
+      </plugin>
+      
+       <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-junit4osgi-plugin</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <configuration>
+              <org.osgi.http.port>8083</org.osgi.http.port>
+              </configuration>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>
diff --git a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/MultipleFilterDependencies.java b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/MultipleFilterDependencies.java
index 6334c5c..71349d1 100644
--- a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/MultipleFilterDependencies.java
+++ b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/MultipleFilterDependencies.java
@@ -30,27 +30,27 @@
 import org.apache.felix.ipojo.test.scenarios.service.dependency.service.CheckService;
 
 public class MultipleFilterDependencies extends OSGiTestCase {
-	
-	ComponentInstance instance1, instance2, instance3;
-	ComponentInstance fooProvider1, fooProvider2;
-	
-	public void setUp() {
-		try {
-			Properties prov = new Properties();
-			prov.put("instance.name","FooProvider1");
-			fooProvider1 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
-			fooProvider1.stop();
-			
-			prov = new Properties();
+    
+    ComponentInstance instance1, instance2, instance3;
+    ComponentInstance fooProvider1, fooProvider2;
+    
+    public void setUp() {
+        try {
+            Properties prov = new Properties();
+            prov.put("instance.name","FooProvider1");
+            fooProvider1 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
+            fooProvider1.stop();
+            
+            prov = new Properties();
             prov.put("instance.name","FooProvider2");
             fooProvider2 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
             fooProvider2.stop();
-		
-			Properties i1 = new Properties();
-			i1.put("instance.name","Subscriber1");
-			instance1 = Utils.getFactoryByName(getContext(), "MultipleFilterCheckServiceSubscriber").createComponentInstance(i1);
-			
-			Properties i2 = new Properties();
+        
+            Properties i1 = new Properties();
+            i1.put("instance.name","Subscriber1");
+            instance1 = Utils.getFactoryByName(getContext(), "MultipleFilterCheckServiceSubscriber").createComponentInstance(i1);
+            
+            Properties i2 = new Properties();
             i2.put("instance.name","Subscriber2");
             Properties ii2 = new Properties();
             ii2.put("id2", "(toto=A)");
@@ -63,47 +63,47 @@
             ii3.put("id1", "(toto=A)");
             i3.put("requires.filters", ii3);
             instance3 = Utils.getFactoryByName(getContext(), "MultipleFilterCheckServiceSubscriber").createComponentInstance(i3);
-		
-		} catch(Exception e) { 
-		    e.printStackTrace();
-		    fail(e.getMessage()); }
-		
-	}
-	
-	public void tearDown() {
-		instance1.dispose();
-		instance2.dispose();
-		instance3.dispose();
-		fooProvider1.dispose();
-		fooProvider2.dispose();
-		instance1 = null;
-		instance2 = null;
-		instance3 = null;
-		fooProvider1 = null;
-		fooProvider2 = null;
-	}
-	
-	public void testMultipleNotMatch() {
-	    instance1.start();
-	    
-		ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
-		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
+        
+        } catch(Exception e) { 
+            e.printStackTrace();
+            fail(e.getMessage()); }
+        
+    }
+    
+    public void tearDown() {
+        instance1.dispose();
+        instance2.dispose();
+        instance3.dispose();
+        fooProvider1.dispose();
+        fooProvider2.dispose();
+        instance1 = null;
+        instance2 = null;
+        instance3 = null;
+        fooProvider1 = null;
+        fooProvider2 = null;
+    }
+    
+    public void testMultipleNotMatch() {
+        instance1.start();
+        
+        ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
+        assertNotNull("Check architecture availability", arch_ref);
+        InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         
-		fooProvider1.start();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
-		
-		ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
-		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) getContext().getService(cs_ref);
-		// change the value of the property toto
-		cs.check();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        fooProvider1.start();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
+        
+        ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref);
+        CheckService cs = (CheckService) getContext().getService(cs_ref);
+        // change the value of the property toto
+        cs.check();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
         ServiceReference cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_instance_ref);
@@ -138,27 +138,32 @@
         assertTrue("Check service Binding - 6", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(1)));
         assertTrue("Check Array size - 6", ((Integer)cs_instance.getProps().get("Size")).equals(new Integer(1)));
         
-		fooProvider2.stop();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance invalidity - 7", id.getState() == ComponentInstance.INVALID);
-		
-		
-		fooProvider2.start();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        fooProvider2.stop();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance invalidity - 7", id.getState() == ComponentInstance.INVALID);
+        
+        
+        fooProvider2.start();
+        cs_ref2 = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider2.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref2);
+        cs2 = (CheckService) getContext().getService(cs_ref2);
+        // change the value of the property toto
+        cs2.check();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 8", id.getState() == ComponentInstance.VALID);
         cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_instance_ref);
         cs_instance = (CheckService) getContext().getService(cs_instance_ref);
         assertTrue("Check service Binding - 8", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(1)));
         assertTrue("Check Array size - 8", ((Integer)cs_instance.getProps().get("Size")).equals(new Integer(1)));
-		
-		fooProvider2.stop();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        
+        fooProvider2.stop();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 9", id.getState() == ComponentInstance.INVALID);
-		
+        
         id = null;
         cs = null;
         cs2 = null;
@@ -167,14 +172,14 @@
         getContext().ungetService(arch_ref);
         getContext().ungetService(cs_ref);
         getContext().ungetService(cs_ref2);		
-	}
-	
-	public void testMultipleMatch() {
-	    
-	    fooProvider1.start();
-	    fooProvider2.start();
-	    
-	    ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+    }
+    
+    public void testMultipleMatch() {
+        
+        fooProvider1.start();
+        fooProvider2.start();
+        
+        ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
         CheckService cs = (CheckService) getContext().getService(cs_ref);
         // change the value of the property toto
@@ -185,7 +190,7 @@
         CheckService cs2 = (CheckService) getContext().getService(cs_ref2);
         // change the value of the property toto
         cs2.check();
-	    
+        
         instance1.start();
         
         ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
@@ -215,6 +220,11 @@
         assertTrue("Check instance invalidity - 3", id.getState() == ComponentInstance.INVALID);
         
         fooProvider2.start();
+        cs_ref2 = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider2.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref2);
+        cs2 = (CheckService) getContext().getService(cs_ref2);
+        // change the value of the property toto
+        cs2.check();
         
         id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
@@ -242,8 +252,8 @@
         getContext().ungetService(cs_ref);
         getContext().ungetService(cs_ref2);      
     }
-	
-	public void testMultipleNotMatchInstance() {
+    
+    public void testMultipleNotMatchInstance() {
         instance3.start();
         
         ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance3.getInstanceName());
@@ -405,7 +415,7 @@
         getContext().ungetService(cs_ref);
         getContext().ungetService(cs_ref2);        
     }
-	
+    
     public void testMultipleNotMatchInstanceWithoutFilter() {
         instance2.start();
         
diff --git a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/OptionalMultipleFilterDependencies.java b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/OptionalMultipleFilterDependencies.java
index 61bba51..3427003 100644
--- a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/OptionalMultipleFilterDependencies.java
+++ b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/OptionalMultipleFilterDependencies.java
@@ -30,27 +30,27 @@
 import org.apache.felix.ipojo.test.scenarios.service.dependency.service.CheckService;
 
 public class OptionalMultipleFilterDependencies extends OSGiTestCase {
-	
-	ComponentInstance instance1, instance2, instance3;
-	ComponentInstance fooProvider1, fooProvider2;
-	
-	public void setUp() {
-		try {
-			Properties prov = new Properties();
-			prov.put("instance.name","FooProvider1");
-			fooProvider1 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
-			fooProvider1.stop();
-			
-			prov = new Properties();
+    
+    ComponentInstance instance1, instance2, instance3;
+    ComponentInstance fooProvider1, fooProvider2;
+    
+    public void setUp() {
+        try {
+            Properties prov = new Properties();
+            prov.put("instance.name","FooProvider1");
+            fooProvider1 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
+            fooProvider1.stop();
+            
+            prov = new Properties();
             prov.put("instance.name","FooProvider2");
             fooProvider2 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
             fooProvider2.stop();
-		
-			Properties i1 = new Properties();
-			i1.put("instance.name","Subscriber1");
-			instance1 = Utils.getFactoryByName(getContext(), "OptionalMultipleFilterCheckServiceSubscriber").createComponentInstance(i1);
-			
-			Properties i2 = new Properties();
+        
+            Properties i1 = new Properties();
+            i1.put("instance.name","Subscriber1");
+            instance1 = Utils.getFactoryByName(getContext(), "OptionalMultipleFilterCheckServiceSubscriber").createComponentInstance(i1);
+            
+            Properties i2 = new Properties();
             i2.put("instance.name","Subscriber2");
             Properties ii2 = new Properties();
             ii2.put("id2", "(toto=A)");
@@ -63,55 +63,55 @@
             ii3.put("id1", "(toto=A)");
             i3.put("requires.filters", ii3);
             instance3 = Utils.getFactoryByName(getContext(), "OptionalMultipleFilterCheckServiceSubscriber").createComponentInstance(i3);
-		
-		} catch(Exception e) { 
-		    e.printStackTrace();
-		    fail(e.getMessage()); }
-		
-	}
-	
-	public void tearDown() {
-		instance1.dispose();
-		instance2.dispose();
-		instance3.dispose();
-		fooProvider1.dispose();
-		fooProvider2.dispose();
-		instance1 = null;
-		instance2 = null;
-		instance3 = null;
-		fooProvider1 = null;
-		fooProvider2 = null;
-	}
-	
-	public void testMultipleNotMatch() {
-	    instance1.start();
-	    
-		ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
-		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
-		ServiceReference cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
+        
+        } catch(Exception e) { 
+            e.printStackTrace();
+            fail(e.getMessage()); }
+        
+    }
+    
+    public void tearDown() {
+        instance1.dispose();
+        instance2.dispose();
+        instance3.dispose();
+        fooProvider1.dispose();
+        fooProvider2.dispose();
+        instance1 = null;
+        instance2 = null;
+        instance3 = null;
+        fooProvider1 = null;
+        fooProvider2 = null;
+    }
+    
+    public void testMultipleNotMatch() {
+        instance1.start();
+        
+        ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
+        assertNotNull("Check architecture availability", arch_ref);
+        InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
+        ServiceReference cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_instance_ref);
         CheckService cs_instance = (CheckService) getContext().getService(cs_instance_ref);
         assertTrue("Check service invocation", cs_instance.check());
         assertTrue("Check service Binding - 1", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
         assertTrue("Check Array size - 1", ((Integer)cs_instance.getProps().get("Size")).equals(new Integer(0)));
         
-		fooProvider1.start();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
-		assertTrue("Check service invocation", cs_instance.check());
+        fooProvider1.start();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
+        assertTrue("Check service invocation", cs_instance.check());
         assertTrue("Check service Binding - 2", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
         assertTrue("Check Array size - 2", ((Integer)cs_instance.getProps().get("Size")).equals(new Integer(0)));
-		
-		ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
-		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) getContext().getService(cs_ref);
-		// change the value of the property toto
-		cs.check();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        
+        ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref);
+        CheckService cs = (CheckService) getContext().getService(cs_ref);
+        // change the value of the property toto
+        cs.check();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
         cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_instance_ref);
@@ -121,6 +121,7 @@
         assertTrue("Check service Binding - 3", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(1)));
         
         fooProvider2.start();
+        
         id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
         cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
@@ -146,27 +147,33 @@
         assertTrue("Check service Binding - 6", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(1)));
         assertTrue("Check Array size - 6", ((Integer)cs_instance.getProps().get("Size")).equals(new Integer(1)));
         
-		fooProvider2.stop();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance validity - 7", id.getState() == ComponentInstance.VALID);
-		assertTrue("Check service Binding - 7", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
-		assertTrue("Check Array size - 7", ((Integer)cs_instance.getProps().get("Size")).equals(new Integer(0)));
-		
-		fooProvider2.start();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        fooProvider2.stop();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance validity - 7", id.getState() == ComponentInstance.VALID);
+        assertTrue("Check service Binding - 7", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
+        assertTrue("Check Array size - 7", ((Integer)cs_instance.getProps().get("Size")).equals(new Integer(0)));
+        
+        fooProvider2.start();  
+        
+        cs_ref2 = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider2.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref2);
+        cs2 = (CheckService) getContext().getService(cs_ref2);
+        // change the value of the property toto
+        cs2.check();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 8", id.getState() == ComponentInstance.VALID);
         assertTrue("Check service Binding - 8", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(1)));
         assertTrue("Check Array size - 8", ((Integer)cs_instance.getProps().get("Size")).equals(new Integer(1)));
-		
-		fooProvider2.stop();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        
+        fooProvider2.stop();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 9", id.getState() == ComponentInstance.VALID);
         assertTrue("Check service Binding - 9", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
         assertTrue("Check Array size - 9", ((Integer)cs_instance.getProps().get("Size")).equals(new Integer(0)));
-		
+        
         id = null;
         cs = null;
         cs2 = null;
@@ -175,14 +182,14 @@
         getContext().ungetService(arch_ref);
         getContext().ungetService(cs_ref);
         getContext().ungetService(cs_ref2);		
-	}
-	
-	public void testMultipleMatch() {
-	    
-	    fooProvider1.start();
-	    fooProvider2.start();
-	    
-	    ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+    }
+    
+    public void testMultipleMatch() {
+        
+        fooProvider1.start();
+        fooProvider2.start();
+        
+        ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
         CheckService cs = (CheckService) getContext().getService(cs_ref);
         // change the value of the property toto
@@ -193,7 +200,7 @@
         CheckService cs2 = (CheckService) getContext().getService(cs_ref2);
         // change the value of the property toto
         cs2.check();
-	    
+        
         instance1.start();
         
         ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
@@ -227,6 +234,12 @@
         
         fooProvider2.start();
         
+        cs_ref2 = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider2.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref2);
+        cs2 = (CheckService) getContext().getService(cs_ref2);
+        // change the value of the property toto
+        cs2.check();
+        
         id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
         assertTrue("Check service invocation", cs_instance.check());
@@ -250,8 +263,8 @@
         getContext().ungetService(cs_ref);
         getContext().ungetService(cs_ref2);      
     }
-	
-	public void testMultipleNotMatchInstance() {
+    
+    public void testMultipleNotMatchInstance() {
         instance3.start();
         
         ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance3.getInstanceName());
@@ -419,7 +432,7 @@
         getContext().ungetService(cs_ref);
         getContext().ungetService(cs_ref2);        
     }
-	
+    
     public void testMultipleNotMatchInstanceWithoutFilter() {
         instance2.start();
         
diff --git a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/OptionalSimpleFilterDependencies.java b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/OptionalSimpleFilterDependencies.java
index 628dbef..fb13882 100644
--- a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/OptionalSimpleFilterDependencies.java
+++ b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/OptionalSimpleFilterDependencies.java
@@ -30,27 +30,27 @@
 import org.apache.felix.ipojo.test.scenarios.service.dependency.service.CheckService;
 
 public class OptionalSimpleFilterDependencies extends OSGiTestCase {
-	
-	ComponentInstance instance1, instance2, instance3;
-	ComponentInstance fooProvider1, fooProvider2;
-	
-	public void setUp() {
-		try {
-			Properties prov = new Properties();
-			prov.put("instance.name","FooProvider1");
-			fooProvider1 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
-			fooProvider1.stop();
-			
-			prov = new Properties();
+    
+    ComponentInstance instance1, instance2, instance3;
+    ComponentInstance fooProvider1, fooProvider2;
+    
+    public void setUp() {
+        try {
+            Properties prov = new Properties();
+            prov.put("instance.name","FooProvider1");
+            fooProvider1 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
+            fooProvider1.stop();
+            
+            prov = new Properties();
             prov.put("instance.name","FooProvider2");
             fooProvider2 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
             fooProvider2.stop();
-		
-			Properties i1 = new Properties();
-			i1.put("instance.name","Subscriber1");
-			instance1 = Utils.getFactoryByName(getContext(), "OptionalSimpleFilterCheckServiceSubscriber").createComponentInstance(i1);
-			
-			Properties i2 = new Properties();
+        
+            Properties i1 = new Properties();
+            i1.put("instance.name","Subscriber1");
+            instance1 = Utils.getFactoryByName(getContext(), "OptionalSimpleFilterCheckServiceSubscriber").createComponentInstance(i1);
+            
+            Properties i2 = new Properties();
             i2.put("instance.name","Subscriber2");
             Properties ii2 = new Properties();
             ii2.put("id2", "(toto=A)");
@@ -63,57 +63,57 @@
             ii3.put("id1", "(toto=A)");
             i3.put("requires.filters", ii3);
             instance3 = Utils.getFactoryByName(getContext(), "OptionalSimpleFilterCheckServiceSubscriber").createComponentInstance(i3);
-		
-		} catch(Exception e) { 
-		    e.printStackTrace();
-		    fail(e.getMessage()); }
-		
-	}
-	
-	public void tearDown() {
-		instance1.dispose();
-		instance2.dispose();
-		instance3.dispose();
-		fooProvider1.dispose();
-		fooProvider2.dispose();
-		instance1 = null;
-		instance2 = null;
-		instance3 = null;
-		fooProvider1 = null;
-		fooProvider2 = null;
-	}
-	
-	public void testSimpleNotMatch() {
-	    instance1.start();
-	    
-		ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
-		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
-		ServiceReference cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
+        
+        } catch(Exception e) { 
+            e.printStackTrace();
+            fail(e.getMessage()); }
+        
+    }
+    
+    public void tearDown() {
+        instance1.dispose();
+        instance2.dispose();
+        instance3.dispose();
+        fooProvider1.dispose();
+        fooProvider2.dispose();
+        instance1 = null;
+        instance2 = null;
+        instance3 = null;
+        fooProvider1 = null;
+        fooProvider2 = null;
+    }
+    
+    public void testSimpleNotMatch() {
+        instance1.start();
+        
+        ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
+        assertNotNull("Check architecture availability", arch_ref);
+        InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
+        ServiceReference cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_instance_ref);
         CheckService cs_instance = (CheckService) getContext().getService(cs_instance_ref);
         assertTrue("Check service invocation", cs_instance.check());
         assertTrue("Check service Binding - 1", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
         assertTrue("Check Nullable - 1", ((Boolean)cs_instance.getProps().get("Nullable")).booleanValue());
         
-		fooProvider1.start();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
-		assertTrue("Check service invocation", cs_instance.check());
+        fooProvider1.start();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
+        assertTrue("Check service invocation", cs_instance.check());
         assertTrue("Check service Binding - 2", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
         assertTrue("Check Nullable - 2", ((Boolean)cs_instance.getProps().get("Nullable")).booleanValue());
-		
-		ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
-		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) getContext().getService(cs_ref);
-		// change the value of the property toto
-		cs.check();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        
+        ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref);
+        CheckService cs = (CheckService) getContext().getService(cs_ref);
+        // change the value of the property toto
+        cs.check();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
-		
+        
         cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_instance_ref);
         cs_instance = (CheckService) getContext().getService(cs_instance_ref);
@@ -140,49 +140,62 @@
         assertTrue("Check service Binding - 5", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(1)));
         assertFalse("Check Nullable - 5", ((Boolean)cs_instance.getProps().get("Nullable")).booleanValue());
         
-		fooProvider1.stop();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
-		assertTrue("Check service Binding - 6", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
-		assertTrue("Check Nullable - 6", ((Boolean)cs_instance.getProps().get("Nullable")).booleanValue());
-		fooProvider1.start();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
-		
-		cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
-		assertNotNull("Check CheckService availability", cs_instance_ref);
-		cs_instance = (CheckService) getContext().getService(cs_instance_ref);
-		assertTrue("check CheckService invocation", cs_instance.check());
-		assertTrue("Check service Binding - 7", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(1)));
-		assertFalse("Check Nullable - 7", ((Boolean)cs_instance.getProps().get("Nullable")).booleanValue());
-		
-		fooProvider1.stop();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
-		assertTrue("Check service Binding - 8", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
-		assertTrue("Check Nullable - 8", ((Boolean)cs_instance.getProps().get("Nullable")).booleanValue());
-		
-		id = null;
-		cs = null;
-		cs_instance = null;
-		getContext().ungetService(cs_instance_ref);
-		getContext().ungetService(arch_ref);
-		getContext().ungetService(cs_ref);		
-	}
-	
-	public void testSimpleMatch() {
-	    
-	    fooProvider1.start();
-	    
-	    ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+        fooProvider1.stop();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
+        assertTrue("Check service Binding - 6", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
+        assertTrue("Check Nullable - 6", ((Boolean)cs_instance.getProps().get("Nullable")).booleanValue());
+        
+        fooProvider1.start(); // Registered with toto = A
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID); // Optional
+        assertTrue("Check service Binding - 7.0 (" + (Integer)cs_instance.getProps().get("Bind") +")", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
+
+        
+        cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref);
+        cs = (CheckService) getContext().getService(cs_ref);
+        // change the value of the property toto
+        cs.check(); // Update toto to B
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance validity - 3.1", id.getState() == ComponentInstance.VALID);
+        
+        
+        cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_instance_ref);
+        cs_instance = (CheckService) getContext().getService(cs_instance_ref);
+        assertTrue("check CheckService invocation", cs_instance.check());
+        assertTrue("Check service Binding - 7.1 (" + (Integer)cs_instance.getProps().get("Bind") +")", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(1)));
+        assertFalse("Check Nullable - 7", ((Boolean)cs_instance.getProps().get("Nullable")).booleanValue());
+        
+        fooProvider1.stop();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
+        assertTrue("Check service Binding - 8", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(0)));
+        assertTrue("Check Nullable - 8", ((Boolean)cs_instance.getProps().get("Nullable")).booleanValue());
+        
+        id = null;
+        cs = null;
+        cs_instance = null;
+        getContext().ungetService(cs_instance_ref);
+        getContext().ungetService(arch_ref);
+        getContext().ungetService(cs_ref);		
+    }
+    
+    public void testSimpleMatch() {
+        
+        fooProvider1.start();
+        
+        ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
         CheckService cs = (CheckService) getContext().getService(cs_ref);
         // change the value of the property toto
         cs.check();
-	    
+        
         instance1.start();
         
         ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
@@ -224,8 +237,15 @@
         
         fooProvider1.start();
         
+        cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref);
+        cs = (CheckService) getContext().getService(cs_ref);
+        // change the value of the property toto
+        cs.check(); // Update toto to B
+        
         id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-        assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
+        assertTrue("Check instance validity - 5.1", id.getState() == ComponentInstance.VALID);
+        
         assertTrue("Check service invocation", cs_instance.check());
         assertTrue("Check service Binding - 5", ((Integer)cs_instance.getProps().get("Bind")).equals(new Integer(1)));
         assertFalse("Check Nullable - 5", ((Boolean)cs_instance.getProps().get("Nullable")).booleanValue());
@@ -245,8 +265,8 @@
         getContext().ungetService(arch_ref);
         getContext().ungetService(cs_ref);       
     }
-	
-	public void testSimpleNotMatchInstance() {
+    
+    public void testSimpleNotMatchInstance() {
         instance3.start();
         
         ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance3.getInstanceName());
@@ -400,7 +420,7 @@
         getContext().ungetService(arch_ref);
         getContext().ungetService(cs_ref);       
     }
-	
+    
     public void testSimpleNotMatchInstanceWithoutFilter() {
         instance2.start();
         
diff --git a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/SimpleFilterDependencies.java b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/SimpleFilterDependencies.java
index 409e279..ebc147b 100644
--- a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/SimpleFilterDependencies.java
+++ b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/SimpleFilterDependencies.java
@@ -30,27 +30,27 @@
 import org.apache.felix.ipojo.test.scenarios.service.dependency.service.CheckService;
 
 public class SimpleFilterDependencies extends OSGiTestCase {
-	
-	ComponentInstance instance1, instance2, instance3;
-	ComponentInstance fooProvider1, fooProvider2;
-	
-	public void setUp() {
-		try {
-			Properties prov = new Properties();
-			prov.put("instance.name","FooProvider1");
-			fooProvider1 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
-			fooProvider1.stop();
-			
-			prov = new Properties();
+    
+    ComponentInstance instance1, instance2, instance3;
+    ComponentInstance fooProvider1, fooProvider2;
+    
+    public void setUp() {
+        try {
+            Properties prov = new Properties();
+            prov.put("instance.name","FooProvider1");
+            fooProvider1 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
+            fooProvider1.stop();
+            
+            prov = new Properties();
             prov.put("instance.name","FooProvider2");
             fooProvider2 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceProvider").createComponentInstance(prov);
             fooProvider2.stop();
-		
-			Properties i1 = new Properties();
-			i1.put("instance.name","Subscriber1");
-			instance1 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceSubscriber").createComponentInstance(i1);
-			
-			Properties i2 = new Properties();
+        
+            Properties i1 = new Properties();
+            i1.put("instance.name","Subscriber1");
+            instance1 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceSubscriber").createComponentInstance(i1);
+            
+            Properties i2 = new Properties();
             i2.put("instance.name","Subscriber2");
             Properties ii2 = new Properties();
             ii2.put("id2", "(toto=A)");
@@ -63,48 +63,48 @@
             ii3.put("id1", "(toto=A)");
             i3.put("requires.filters", ii3);
             instance3 = Utils.getFactoryByName(getContext(), "SimpleFilterCheckServiceSubscriber").createComponentInstance(i3);
-		
-		} catch(Exception e) { 
-		    e.printStackTrace();
-		    fail(e.getMessage()); }
-		
-	}
-	
-	public void tearDown() {
-		instance1.dispose();
-		instance2.dispose();
-		instance3.dispose();
-		fooProvider1.dispose();
-		fooProvider2.dispose();
-		instance1 = null;
-		instance2 = null;
-		instance3 = null;
-		fooProvider1 = null;
-		fooProvider2 = null;
-	}
-	
-	public void testSimpleNotMatch() {
-	    instance1.start();
-	    
-		ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
-		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
-		
-		fooProvider1.start();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
-		
-		ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
-		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) getContext().getService(cs_ref);
-		// change the value of the property toto
-		cs.check();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        
+        } catch(Exception e) { 
+            e.printStackTrace();
+            fail(e.getMessage()); }
+        
+    }
+    
+    public void tearDown() {
+        instance1.dispose();
+        instance2.dispose();
+        instance3.dispose();
+        fooProvider1.dispose();
+        fooProvider2.dispose();
+        instance1 = null;
+        instance2 = null;
+        instance3 = null;
+        fooProvider1 = null;
+        fooProvider2 = null;
+    }
+    
+    public void testSimpleNotMatch() {
+        instance1.start();
+        
+        ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
+        assertNotNull("Check architecture availability", arch_ref);
+        InstanceDescription id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
+        
+        fooProvider1.start();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
+        
+        ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref);
+        CheckService cs = (CheckService) getContext().getService(cs_ref);
+        // change the value of the property toto
+        cs.check();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
-		
+        
         ServiceReference cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_instance_ref);
         CheckService cs_instance = (CheckService) getContext().getService(cs_instance_ref);
@@ -127,44 +127,52 @@
         cs_instance = (CheckService) getContext().getService(cs_instance_ref);
         assertTrue("check CheckService invocation", cs_instance.check());
         
-		fooProvider1.stop();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance invalidity - 4", id.getState() == ComponentInstance.INVALID);
-		
-		fooProvider1.start();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
-		
-		cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
-		assertNotNull("Check CheckService availability", cs_instance_ref);
-		cs_instance = (CheckService) getContext().getService(cs_instance_ref);
-		assertTrue("check CheckService invocation", cs_instance.check());
-		
-		fooProvider1.stop();
-		
-		id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-		assertTrue("Check instance invalidity - 5", id.getState() == ComponentInstance.INVALID);
-		
-		id = null;
-		cs = null;
-		cs_instance = null;
-		getContext().ungetService(cs_instance_ref);
-		getContext().ungetService(arch_ref);
-		getContext().ungetService(cs_ref);		
-	}
-	
-	public void testSimpleMatch() {
-	    
-	    fooProvider1.start();
-	    
-	    ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+        fooProvider1.stop();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance invalidity - 4", id.getState() == ComponentInstance.INVALID);
+        
+        fooProvider1.start();
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+
+        assertTrue("Check instance invalidity - 4.1", id.getState() == ComponentInstance.INVALID);
+        
+        cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref);
+        cs = (CheckService) getContext().getService(cs_ref);
+        cs.check();
+        
+        assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
+
+        
+        cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_instance_ref);
+        cs_instance = (CheckService) getContext().getService(cs_instance_ref);
+        assertTrue("check CheckService invocation", cs_instance.check());
+        
+        fooProvider1.stop();
+        
+        id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
+        assertTrue("Check instance invalidity - 5", id.getState() == ComponentInstance.INVALID);
+        
+        id = null;
+        cs = null;
+        cs_instance = null;
+        getContext().ungetService(cs_instance_ref);
+        getContext().ungetService(arch_ref);
+        getContext().ungetService(cs_ref);		
+    }
+    
+    public void testSimpleMatch() {
+        
+        fooProvider1.start();
+        
+        ServiceReference cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
         CheckService cs = (CheckService) getContext().getService(cs_ref);
         // change the value of the property toto
         cs.check();
-	    
+        
         instance1.start();
         
         ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance1.getInstanceName());
@@ -202,7 +210,14 @@
         fooProvider1.start();
         
         id = ((Architecture) getContext().getService(arch_ref)).getInstanceDescription();
-        assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
+        assertTrue("Check instance invalidity - 4.1", id.getState() == ComponentInstance.INVALID);
+        
+        cs_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), fooProvider1.getInstanceName());
+        assertNotNull("Check CheckService availability", cs_ref);
+        cs = (CheckService) getContext().getService(cs_ref);
+        cs.check();
+        
+        assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);        
         
         cs_instance_ref = Utils.getServiceReferenceByName(getContext(), CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_instance_ref);
@@ -221,8 +236,8 @@
         getContext().ungetService(arch_ref);
         getContext().ungetService(cs_ref);       
     }
-	
-	public void testSimpleNotMatchInstance() {
+    
+    public void testSimpleNotMatchInstance() {
         instance3.start();
         
         ServiceReference arch_ref = Utils.getServiceReferenceByName(getContext(), Architecture.class.getName(), instance3.getInstanceName());
@@ -358,7 +373,7 @@
         getContext().ungetService(arch_ref);
         getContext().ungetService(cs_ref);       
     }
-	
+    
     public void testSimpleNotMatchInstanceWithoutFilter() {
         instance2.start();
         
diff --git a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/component/FilterCheckProvider.java b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/component/FilterCheckProvider.java
index 2a81c23..af7cc7a 100644
--- a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/component/FilterCheckProvider.java
+++ b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/component/FilterCheckProvider.java
@@ -31,7 +31,7 @@
     
     private int unbind;
     
-    public FilterCheckProvider(){
+    public FilterCheckProvider() {
         m_toto = "A";
     }
     
diff --git a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/component/FilterCheckSubscriber.java b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/component/FilterCheckSubscriber.java
index cfd1be8..5d1bc0d 100644
--- a/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/component/FilterCheckSubscriber.java
+++ b/ipojo/tests/core/service-dependency-filter/src/main/java/org/apache/felix/ipojo/test/scenarios/service/dependency/filter/component/FilterCheckSubscriber.java
@@ -29,7 +29,7 @@
     
     private FooService m_foo;
     
-    private int binded;
+    private int bound;
     
     public FilterCheckSubscriber(){
     }
@@ -41,16 +41,16 @@
 
     public Properties getProps() {
         Properties props = new Properties();
-        props.put("Bind", new Integer(binded));
+        props.put("Bind", new Integer(bound));
         props.put("Nullable", new Boolean(m_foo instanceof Nullable));
         return props;
     }
     
     private void Bind() {
-        binded++;
+        bound++;
     }
     private void Unbind() {
-        binded--;
+        bound--;
     }
 
 }
