FELIX-4314 Fixed the code as described. Adapted the test cases as this affected some of the mock objects we were constructing.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1542239 13f79535-47bb-0310-9956-ffa450edef68