@Test
public void canBeCommittedIfUnknownExceptionThrown() {

  Transactional transactional = createNiceMock(Transactional.class);
  EntityTransaction transaction = createStrictMock(EntityTransaction.class);
  expect(transaction.getRollbackOnly()).andReturn(false);
  expect(transactional.rollbackOn()).andReturn(asArray(IllegalArgumentException.class));
  replayAll();
  boolean canCommit = rollbackIfNecessary(transactional, new RuntimeException(), transaction);
  Assert.assertTrue("Should be allowed to commit, exception thrown does not match rollbackOn clause", canCommit);
  verifyAll();
}