Assert.assertNotNull(serviceTracker1.waitForService(2000));
// asserts that test service with custom properties is available
ServiceTracker serviceTracker2 = new ServiceTracker(bc, FrameworkUtil.createFilter(
"(&(" + Constants.OBJECTCLASS + "=org.knowhowlab.osgi.testing.it.commons.testbundle.service.Echo)" +
"(testkey=testvalue))"), null);
serviceTracker2.open();
Assert.assertTrue(serviceTracker2.size() > 0);
// gets service by class and filter
Echo echo = (Echo) serviceTracker2.getService();
// asserts service method call
Assert.assertEquals("test", echo.echo("test"));