TransactionServiceImpl implements TransactionService { public void rollback(String txId) { completeTx(txId); } @Inject  TransactionServiceImpl(TransactionInMemoryCache memCache,
                                TransactionFactory factory); String getNextTransactionId(); void commit(String txId); void rollback(String txId); void save(TransactionElement<T> element); void update(TransactionElement<T> element); void delete(TransactionElement<T> element);  }
@Test public void testHardRollbackWithEmptyDeque() { final TransactionService service = injector.getInstance(TransactionService.class); final TransactionServiceImpl serviceImpl = (TransactionServiceImpl) service; serviceImpl.rollback(new LinkedList<Pair<TransactionStoreKey, TransactionStoreValue>>()); serviceImpl.rollback((Deque<Pair<TransactionStoreKey, TransactionStoreValue>>) null); }