dana-i2cat/mqnaas — pull request #73 by adrian-rosello (2014-12-03 15:35:48+00:00)
Title: Fix tests broken when BindingManagement started to depend on OSGI classes

BindingManagement now depends on OSGI related classes. When introducing this feature, the tests updated in this pul request got broken.

In order to mock static method, we need to run the test with the PowerMockRunner. It seems that the order of the tests execution is different from the normal junit runner, so I discovered dependency between test executions in BindingManagementTest class.

One test added the SampleCapability to the bindingManagement, and some other tests assumed they were already there. Therefore I needed to modify visibility of the knownCapabilities attribute of the BindingManagement to package private, so in the test I can check if the capability has been already added or not.