diff --git a/ipojo/tests/core/configuration/pom.xml b/ipojo/tests/core/configuration/pom.xml
index b13edfc..c7c1c22 100644
--- a/ipojo/tests/core/configuration/pom.xml
+++ b/ipojo/tests/core/configuration/pom.xml
@@ -18,12 +18,12 @@
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>ipojo.tests</groupId>
-    <artifactId>ipojo.tests</artifactId>
-    <version>1.5.0-SNAPSHOT</version>
-    <relativePath>../../pom.xml</relativePath>
-  </parent>
+  <parent>
+    <groupId>ipojo.tests</groupId>
+    <artifactId>ipojo.tests</artifactId>
+    <version>1.5.0-SNAPSHOT</version>
+    <relativePath>../../pom.xml</relativePath>
+  </parent>
 
   <modelVersion>4.0.0</modelVersion>
   <packaging>bundle</packaging>
@@ -35,6 +35,7 @@
     <dependency>
       <groupId>org.apache.felix</groupId>
       <artifactId>org.apache.felix.ipojo</artifactId>
+	  <version>${ipojo.core.snapshot}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.felix</groupId>
@@ -45,10 +46,10 @@
       <artifactId>org.osgi.core</artifactId>
     </dependency>
     <dependency>
-    <groupId>org.osgi</groupId>
-    <artifactId>org.osgi.compendium</artifactId>
-    <version>4.0.0</version>
-  </dependency>
+    <groupId>org.osgi</groupId>
+    <artifactId>org.osgi.compendium</artifactId>
+    <version>4.0.0</version>
+  </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
diff --git a/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/ManagedServiceConfigurableProperties.java b/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/ManagedServiceConfigurableProperties.java
index 754d33a..92997b2 100644
--- a/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/ManagedServiceConfigurableProperties.java
+++ b/ipojo/tests/core/configuration/src/main/java/org/apache/felix/ipojo/test/scenarios/configuration/ManagedServiceConfigurableProperties.java
@@ -113,8 +113,8 @@
 		assertEquals("Check baz equality -2", bazP, "zab");
 		getContext().ungetService(msRef);
 	}
-	
-	public void testStaticInstance2() {
+
+    public void testStaticInstance2() {
         ServiceReference fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check FS availability", fooRef);
         String fooP = (String) fooRef.getProperty("foo");
@@ -123,11 +123,11 @@
         assertEquals("Check foo equality -1", fooP, "foo");
         assertEquals("Check bar equality -1", barP, new Integer(2));
         assertEquals("Check baz equality -1", bazP, "baz");
-        
+
         ServiceReference msRef = Utils.getServiceReferenceByPID(getContext(), ManagedService.class.getName(), "instance");
         assertNotNull("Check ManagedService availability", msRef);
-        
-        
+
+
         // Configuration of baz
         Properties conf = new Properties();
         conf.put("baz", "zab");
@@ -137,7 +137,7 @@
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }
-        
+
         // Recheck props
         fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance2.getInstanceName());
         fooP = (String) fooRef.getProperty("foo");
@@ -149,7 +149,7 @@
         getContext().ungetService(fooRef);
         getContext().ungetService(msRef);
     }
-	
+
 	public void testStaticInstance3() {
         ServiceReference fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check FS availability", fooRef);
@@ -160,11 +160,11 @@
         assertEquals("Check foo equality -1", fooP, null);
         assertEquals("Check bar equality -1", barP, null);
         assertEquals("Check baz equality -1", bazP, null);
-        
+
         ServiceReference msRef = Utils.getServiceReferenceByPID(getContext(), ManagedService.class.getName(), "instance-3");
         assertNotNull("Check ManagedService availability", msRef);
-        
-        
+
+
         // Configuration of baz
         Properties conf = new Properties();
         conf.put("baz", "zab");
@@ -174,7 +174,7 @@
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }
-        
+
         // Recheck props
         fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance3.getInstanceName());
         fooP = (String) fooRef.getProperty("foo");
@@ -186,22 +186,22 @@
         getContext().ungetService(fooRef);
         getContext().ungetService(msRef);
     }
-	
+
 	public void testDynamicInstance1() {
     	ServiceReference fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance1.getInstanceName());
     	assertNotNull("Check FS availability", fooRef);
-    	
+
     	String fooP = (String) fooRef.getProperty("foo");
     	Integer barP = (Integer) fooRef.getProperty("bar");
     	String bazP = (String) fooRef.getProperty("baz");
-    	
+
     	assertEquals("Check foo equality", fooP, "foo");
     	assertEquals("Check bar equality", barP, new Integer(2));
     	assertEquals("Check baz equality", bazP, "baz");
-    	
+
     	ServiceReference msRef = Utils.getServiceReferenceByPID(getContext(), ManagedService.class.getName(), "FooProvider-3");
     	assertNotNull("Check ManagedServiceFactory availability", msRef);
-    	
+
     	// Configuration of baz
     	Properties conf = new Properties();
     	conf.put("baz", "zab");
@@ -211,45 +211,45 @@
     	try {
     		ms.updated(conf);
     	} catch (ConfigurationException e) { fail("Configuration Exception : " + e); }
-    	
+
     	// Re-check props
     	fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance1.getInstanceName());
     	fooP = (String) fooRef.getProperty("foo");
     	barP = (Integer) fooRef.getProperty("bar");
     	bazP = (String) fooRef.getProperty("baz");
-    	
+
     	assertEquals("Check foo equality", fooP, "oof");
     	assertEquals("Check bar equality", barP, new Integer(0));
     	assertEquals("Check baz equality", bazP, "zab");
-    	
+
     	// Check field value
     	FooService fs = (FooService) getContext().getService(fooRef);
     	Properties p = fs.fooProps();
     	fooP = (String) p.get("foo");
     	barP = (Integer) p.get("bar");
-    	
+
     	assertEquals("Check foo field equality", fooP, "oof");
     	assertEquals("Check bar field equality", barP, new Integer(0));
-    	
+
     	getContext().ungetService(fooRef);
     	getContext().ungetService(msRef);
     }
-	
+
 	public void testDynamicInstance2() {
         ServiceReference fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check FS availability", fooRef);
-        
+
         String fooP = (String) fooRef.getProperty("foo");
         Integer barP = (Integer) fooRef.getProperty("bar");
         String bazP = (String) fooRef.getProperty("baz");
-        
+
         assertEquals("Check foo equality", fooP, "foo");
         assertEquals("Check bar equality", barP, new Integer(2));
         assertEquals("Check baz equality", bazP, "baz");
-        
+
         ServiceReference msRef = Utils.getServiceReferenceByPID(getContext(), ManagedService.class.getName(), "instance");
         assertNotNull("Check ManagedServiceFactory availability", msRef);
-        
+
         // Configuration of baz
         Properties conf = new Properties();
         conf.put("baz", "zab");
@@ -259,34 +259,34 @@
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }
-        
+
         // Recheck props
         fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance2.getInstanceName());
         fooP = (String) fooRef.getProperty("foo");
         barP = (Integer) fooRef.getProperty("bar");
         bazP = (String) fooRef.getProperty("baz");
-        
+
         assertEquals("Check foo equality", fooP, "oof");
         assertEquals("Check bar equality", barP, new Integer(0));
         assertEquals("Check baz equality", bazP, "zab");
-        
+
         // Check field value
         FooService fs = (FooService) getContext().getService(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
-        
+
         assertEquals("Check foo field equality", fooP, "oof");
         assertEquals("Check bar field equality", barP, new Integer(0));
-        
+
         getContext().ungetService(fooRef);
         getContext().ungetService(msRef);
     }
-	
+
 	public void testDynamicInstance3() {
         ServiceReference fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check FS availability", fooRef);
-        
+
         Object fooP = fooRef.getProperty("foo");
         Object barP =  fooRef.getProperty("bar");
         Object bazP =  fooRef.getProperty("baz");
@@ -294,10 +294,10 @@
         assertEquals("Check foo equality", fooP, null);
         assertEquals("Check bar equality", barP, null);
         assertEquals("Check baz equality", bazP, null);
-        
+
         ServiceReference msRef = Utils.getServiceReferenceByPID(getContext(), ManagedService.class.getName(), "instance-3");
         assertNotNull("Check ManagedServiceFactory availability", msRef);
-        
+
         // Configuration of baz
         Properties conf = new Properties();
         conf.put("baz", "zab");
@@ -307,26 +307,26 @@
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }
-        
+
         // Recheck props
         fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance3.getInstanceName());
         fooP = (String) fooRef.getProperty("foo");
         barP = (Integer) fooRef.getProperty("bar");
         bazP = (String) fooRef.getProperty("baz");
-        
+
         assertEquals("Check foo equality", fooP, "oof");
         assertEquals("Check bar equality", barP, new Integer(0));
         assertEquals("Check baz equality", bazP, "zab");
-        
+
         // Check field value
         FooService fs = (FooService) getContext().getService(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
-        
+
         assertEquals("Check foo field equality", fooP, "oof");
         assertEquals("Check bar field equality", barP, new Integer(0));
-        
+
         getContext().ungetService(fooRef);
         getContext().ungetService(msRef);
     }
@@ -335,18 +335,18 @@
         assertEquals("Check instance1 state", ComponentInstance.VALID,instance1.getState());
 		ServiceReference fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance1.getInstanceName());
 		assertNotNull("Check FS availability", fooRef);
-		
+
 		String fooP = (String) fooRef.getProperty("foo");
 		Integer barP = (Integer) fooRef.getProperty("bar");
 		String bazP = (String) fooRef.getProperty("baz");
-		
+
 		assertEquals("Check foo equality - 1", fooP, "foo");
 		assertEquals("Check bar equality - 1", barP, new Integer(2));
 		assertEquals("Check baz equality - 1", bazP, "baz");
-		
+
 		ServiceReference msRef = Utils.getServiceReferenceByPID(getContext(), ManagedService.class.getName(), "FooProvider-3");
 		assertNotNull("Check ManagedService availability", msRef);
-		
+
 		// Configuration of baz
 		Properties conf = new Properties();
 		conf.put("baz", "zab");
@@ -354,53 +354,53 @@
 		conf.put("bar", "0");
         assertEquals("Check instance1 state (2)", ComponentInstance.VALID,instance1.getState());
 		ManagedService ms = (ManagedService) getContext().getService(msRef);
-		
+
 		PrimitiveHandler ph = (PrimitiveHandler) ms;
 		assertSame("Check the correct instance", ph.getInstanceManager(), instance1);
-		
+
 		try {
 			ms.updated(conf);
 		} catch (ConfigurationException e) { fail("Configuration Exception : " + e); }
 		assertEquals("Check instance1 state (3)", ComponentInstance.VALID,instance1.getState());
-		
+
 		// Recheck props
 		fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance1.getInstanceName());
 		fooP = (String) fooRef.getProperty("foo");
 		barP = (Integer) fooRef.getProperty("bar");
 		bazP = (String) fooRef.getProperty("baz");
-		
+
 		assertEquals("Check foo equality - 2", fooP, "oof");
 		assertEquals("Check bar equality - 2", barP, new Integer(0));
 		assertEquals("Check baz equality - 2", bazP, "zab");
-		
+
 		// Check field value
 		FooService fs = (FooService) getContext().getService(fooRef);
 		Properties p = fs.fooProps();
 		fooP = (String) p.get("foo");
 		barP = (Integer) p.get("bar");
-		
+
 		assertEquals("Check foo field equality", fooP, "oof");
 		assertEquals("Check bar field equality", barP, new Integer(0));
-		
+
 		getContext().ungetService(fooRef);
 		getContext().ungetService(msRef);
 	}
-    
+
     public void testDynamicStringInstance2() {
         ServiceReference fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check FS availability", fooRef);
-        
+
         String fooP = (String) fooRef.getProperty("foo");
         Integer barP = (Integer) fooRef.getProperty("bar");
         String bazP = (String) fooRef.getProperty("baz");
-        
+
         assertEquals("Check foo equality", fooP, "foo");
         assertEquals("Check bar equality", barP, new Integer(2));
         assertEquals("Check baz equality", bazP, "baz");
-        
+
         ServiceReference msRef = Utils.getServiceReferenceByPID(getContext(), ManagedService.class.getName(), "instance");
         assertNotNull("Check ManagedService availability", msRef);
-        
+
         // Configuration of baz
         Properties conf = new Properties();
         conf.put("baz", "zab");
@@ -410,45 +410,45 @@
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }
-        
+
         // Recheck props
         fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance2.getInstanceName());
         fooP = (String) fooRef.getProperty("foo");
         barP = (Integer) fooRef.getProperty("bar");
         bazP = (String) fooRef.getProperty("baz");
-        
+
         assertEquals("Check foo equality", fooP, "oof");
         assertEquals("Check bar equality", barP, new Integer(0));
         assertEquals("Check baz equality", bazP, "zab");
-        
+
         // Check field value
         FooService fs = (FooService) getContext().getService(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
-        
+
         assertEquals("Check foo field equality", fooP, "oof");
         assertEquals("Check bar field equality", barP, new Integer(0));
-        
+
         getContext().ungetService(fooRef);
         getContext().ungetService(msRef);
     }
-	
+
 	public void testPropagationInstance1() {
 		ServiceReference fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance1.getInstanceName());
 		assertNotNull("Check FS availability", fooRef);
-		
+
 		String fooP = (String) fooRef.getProperty("foo");
 		Integer barP = (Integer) fooRef.getProperty("bar");
 		String bazP = (String) fooRef.getProperty("baz");
-		
+
 		assertEquals("Check foo equality", fooP, "foo");
 		assertEquals("Check bar equality", barP, new Integer(2));
 		assertEquals("Check baz equality", bazP, "baz");
-		
+
 		ServiceReference msRef = Utils.getServiceReferenceByPID(getContext(), ManagedService.class.getName(), "FooProvider-3");
 		assertNotNull("Check ManagedService availability", msRef);
-		
+
 		// Configuration of baz
 		Properties conf = new Properties();
 		conf.put("baz", "zab");
@@ -460,7 +460,7 @@
 		try {
 			ms.updated(conf);
 		} catch (ConfigurationException e) { fail("Configuration Exception : " + e); }
-		
+
 		// Recheck props
 		fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance1.getInstanceName());
 		fooP = (String) fooRef.getProperty("foo");
@@ -470,31 +470,31 @@
 		String prop1 = (String) fooRef.getProperty("propagated1");
 		assertNotNull("Check the propagated2 existency", fooRef.getProperty("propagated2"));
 		Integer prop2 = (Integer) fooRef.getProperty("propagated2");
-		
+
 		assertEquals("Check foo equality", fooP, "foo");
 		assertEquals("Check bar equality", barP, new Integer(2));
 		assertEquals("Check baz equality", bazP, "zab");
 		assertEquals("Check propagated1 equality", prop1, "propagated");
 		assertEquals("Check propagated2 equality", prop2, new Integer(1));
-		
+
 		getContext().ungetService(msRef);
 	}
-	
+
 	public void testPropagationInstance2() {
         ServiceReference fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check FS availability", fooRef);
-        
+
         String fooP = (String) fooRef.getProperty("foo");
         Integer barP = (Integer) fooRef.getProperty("bar");
         String bazP = (String) fooRef.getProperty("baz");
-        
+
         assertEquals("Check foo equality", fooP, "foo");
         assertEquals("Check bar equality", barP, new Integer(2));
         assertEquals("Check baz equality", bazP, "baz");
-        
+
         ServiceReference msRef = Utils.getServiceReferenceByPID(getContext(), ManagedService.class.getName(), "instance");
         assertNotNull("Check ManagedService availability", msRef);
-        
+
         // Configuration of baz
         Properties conf = new Properties();
         conf.put("baz", "zab");
@@ -506,7 +506,7 @@
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }
-        
+
         // Recheck props
         fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance2.getInstanceName());
         fooP = (String) fooRef.getProperty("foo");
@@ -516,31 +516,31 @@
         String prop1 = (String) fooRef.getProperty("propagated1");
         assertNotNull("Check the propagated2 existency", fooRef.getProperty("propagated2"));
         Integer prop2 = (Integer) fooRef.getProperty("propagated2");
-        
+
         assertEquals("Check foo equality", fooP, "foo");
         assertEquals("Check bar equality", barP, new Integer(2));
         assertEquals("Check baz equality", bazP, "zab");
         assertEquals("Check propagated1 equality", prop1, "propagated");
         assertEquals("Check propagated2 equality", prop2, new Integer(1));
-        
+
         getContext().ungetService(msRef);
     }
-	
+
 	public void testPropagationInstance3() {
         ServiceReference fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check FS availability", fooRef);
-        
+
         Object fooP = fooRef.getProperty("foo");
         Object barP =  fooRef.getProperty("bar");
         Object bazP =  fooRef.getProperty("baz");
-        
+
         assertEquals("Check foo equality", fooP, null);
         assertEquals("Check bar equality", barP, null);
         assertEquals("Check baz equality", bazP, null);
-        
+
         ServiceReference msRef = Utils.getServiceReferenceByPID(getContext(), ManagedService.class.getName(), "instance-3");
         assertNotNull("Check ManagedService availability", msRef);
-        
+
         // Configuration of baz
         Properties conf = new Properties();
         conf.put("baz", "zab");
@@ -552,7 +552,7 @@
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) { fail("Configuration Exception : " + e); }
-        
+
         // Recheck props
         fooRef = Utils.getServiceReferenceByName(getContext(), FooService.class.getName(), instance3.getInstanceName());
         fooP = (String) fooRef.getProperty("foo");
@@ -562,14 +562,16 @@
         String prop1 = (String) fooRef.getProperty("propagated1");
         assertNotNull("Check the propagated2 existency", fooRef.getProperty("propagated2"));
         Integer prop2 = (Integer) fooRef.getProperty("propagated2");
-        
+
         assertEquals("Check foo equality", fooP, "foo");
         assertEquals("Check bar equality", barP, new Integer(2));
         assertEquals("Check baz equality", bazP, "zab");
         assertEquals("Check propagated1 equality", prop1, "propagated");
         assertEquals("Check propagated2 equality", prop2, new Integer(1));
-        
+
         getContext().ungetService(msRef);
     }
+	
+
 
 }
