list.add(new RollbackRuleAttribute("javax.servlet.ServletException"));
RuleBasedTransactionAttribute rta = new RuleBasedTransactionAttribute(TransactionDefinition.PROPAGATION_REQUIRED, list);
assertTrue(rta.rollbackOn(new RuntimeException()));
// Check default behaviour is overridden
assertFalse(rta.rollbackOn(new MailSendException("")));
assertFalse(rta.rollbackOn(new Exception()));
// Check that default behaviour is overridden
assertTrue(rta.rollbackOn(new ServletException()));
}