// asserts that test service is available within 2 seconds
assertServiceAvailable("org.knowhowlab.osgi.testing.it.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(getBundleContext(), Echo.class, eq("testkey", "testvalue"));
// asserts service method call
assertEquals("test", echo.echo("test"));
// stops bundle
bundle.stop();
// asserts that test bundle is resolved
assertBundleState(Bundle.RESOLVED, "org.knowhowlab.osgi.testing.it.test.bundle");
// asserts that test service is unregistered