CheckService cs = (CheckService) osgi.getServiceObject(ref);
TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null);
tm.begin();
Transaction t = tm.getTransaction();
try {
cs.doSomethingBad2();
Assert.fail("UnsupportedOperationException expected");
} catch(Exception e) {
Assert.assertTrue(e instanceof UnsupportedOperationException);
}
Transaction t2 = cs.getCurrentTransaction();