FELIX-3227 If existing configuration is not visible to an MS, the update method is called with null

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1202652 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBindingTest.java b/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBindingTest.java
index 20678c1..3e09b3a 100644
--- a/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBindingTest.java
+++ b/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBindingTest.java
@@ -644,10 +644,10 @@
         bundleB.start();
         delay();
 
-        // ==> configuration not supplied to service ms2
+        // ==> invisible configuration supplied as null to service ms2
         final ManagedServiceTestActivator2 testerB1 = ManagedServiceTestActivator2.INSTANCE;
         TestCase.assertNull( testerB1.props );
-        TestCase.assertEquals( 0, testerB1.numManagedServiceUpdatedCalls );
+        TestCase.assertEquals( 1, testerB1.numManagedServiceUpdatedCalls );
 
         // 5. Call Configuration.setBundleLocation( "locationB" )
         config.setBundleLocation( locationB );
@@ -662,7 +662,7 @@
 
         // ==> configuration supplied to the service ms2
         TestCase.assertNotNull( testerB1.props );
-        TestCase.assertEquals( 1, testerB1.numManagedServiceUpdatedCalls );
+        TestCase.assertEquals( 2, testerB1.numManagedServiceUpdatedCalls );
     }
 
 
@@ -694,10 +694,10 @@
         bundleB.start();
         delay();
 
-        // ==> configuration not supplied to service ms2
+        // ==> invisible configuration supplied as null to service ms2
         final ManagedServiceTestActivator2 testerB1 = ManagedServiceTestActivator2.INSTANCE;
         TestCase.assertNull( testerB1.props );
-        TestCase.assertEquals( 0, testerB1.numManagedServiceUpdatedCalls );
+        TestCase.assertEquals( 1, testerB1.numManagedServiceUpdatedCalls );
 
         // 5. Call Configuration.setBundleLocation( "locationB" )
         config.setBundleLocation( locationB );
@@ -712,7 +712,7 @@
 
         // ==> configuration supplied to the service ms2
         TestCase.assertNotNull( testerB1.props );
-        TestCase.assertEquals( 1, testerB1.numManagedServiceUpdatedCalls );
+        TestCase.assertEquals( 2, testerB1.numManagedServiceUpdatedCalls );
 
         // 6. Update configuration now
         config.update();
@@ -720,7 +720,7 @@
 
         // ==> configuration supplied to the service ms2
         TestCase.assertNotNull( testerB1.props );
-        TestCase.assertEquals( 2, testerB1.numManagedServiceUpdatedCalls );
+        TestCase.assertEquals( 3, testerB1.numManagedServiceUpdatedCalls );
     }
 
 
@@ -872,10 +872,10 @@
         bundleB.start();
         delay();
 
-        // ==> configuration not supplied to service ms2
+        // ==> invisible configuration supplied as null to service ms2
         final ManagedServiceTestActivator2 testerB1 = ManagedServiceTestActivator2.INSTANCE;
         TestCase.assertNull( testerB1.props );
-        TestCase.assertEquals( 0, testerB1.numManagedServiceUpdatedCalls );
+        TestCase.assertEquals( 1, testerB1.numManagedServiceUpdatedCalls );
 
         // 5. Uninstall bundle A
         bundleA.uninstall();
@@ -886,7 +886,7 @@
 
         // ==> configuration supplied to the service ms2
         TestCase.assertNotNull( testerB1.props );
-        TestCase.assertEquals( 1, testerB1.numManagedServiceUpdatedCalls );
+        TestCase.assertEquals( 2, testerB1.numManagedServiceUpdatedCalls );
 
         // 6. Update configuration now
         config.update();
@@ -894,7 +894,7 @@
 
         // ==> configuration supplied to the service ms2
         TestCase.assertNotNull( testerB1.props );
-        TestCase.assertEquals( 2, testerB1.numManagedServiceUpdatedCalls );
+        TestCase.assertEquals( 3, testerB1.numManagedServiceUpdatedCalls );
     }
 
 
diff --git a/configadmin/src/test/java/org/apache/felix/cm/integration/MultiServicePIDTest.java b/configadmin/src/test/java/org/apache/felix/cm/integration/MultiServicePIDTest.java
index f4eedda..ccdf856 100644
--- a/configadmin/src/test/java/org/apache/felix/cm/integration/MultiServicePIDTest.java
+++ b/configadmin/src/test/java/org/apache/felix/cm/integration/MultiServicePIDTest.java
@@ -159,9 +159,9 @@
             TestCase.assertNotNull( "Expect Properties after Service Registration", tester.props );
             TestCase.assertEquals( "Expect a single update call", 1, tester.numManagedServiceUpdatedCalls );
 
-            // assert second bundle has no configuration
+            // assert second bundle has no configuration (but called with null)
             TestCase.assertNull( tester2.props );
-            TestCase.assertEquals( 0, tester2.numManagedServiceUpdatedCalls );
+            TestCase.assertEquals( 1, tester2.numManagedServiceUpdatedCalls );
 
             // expect configuration bound to first bundle
             TestCase.assertEquals( bundle.getLocation(), config.getBundleLocation() );
@@ -179,7 +179,7 @@
 
             // assert second bundle now has the configuration
             TestCase.assertNotNull( "Expect Properties after Configuration redispatch", tester2.props );
-            TestCase.assertEquals( "Expect a single update call after Configuration redispatch", 1,
+            TestCase.assertEquals( "Expect a single update call after Configuration redispatch", 2,
                 tester2.numManagedServiceUpdatedCalls );
 
             // remove the configuration for good