Assert.assertNotNull(ref);
CheckService cs = (CheckService) osgi.getServiceObject(ref);
osgi.waitForService(TransactionManager.class.getName(), null, 5000);
TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null);
tm.begin();
Transaction t = tm.getTransaction();
try {
cs.doSomethingBad(); // Fail
Assert.fail("RuntimeException expected");
} catch(RuntimeException e) {