// asserts that test service is available within 2 seconds
assertServiceAvailable("org.knowhowlab.osgi.testing.it.commons.testbundle.service.Echo", 2, TimeUnit.SECONDS);
// asserts that test service with custom properties is available
assertServiceAvailable(and(create(Echo.class), eq("testkey", "testvalue")));
// gets service by class and filter
Echo echo = ServiceUtils.getService(bc, Echo.class, eq("testkey", "testvalue"));
// asserts service method call
Assert.assertEquals("test", echo.echo("test"));
// stops bundle
bundle.stop();
// asserts that test bundle is resolved
assertBundleState(Bundle.RESOLVED, "org.knowhowlab.osgi.testing.it.commons.test.bundle");
// asserts that test service is unregistered