TransactionAttributeEditor editor = new TransactionAttributeEditor();
editor.setAsText("+RuntimeException,+SkippableException");
RuleBasedTransactionAttribute attr = (RuleBasedTransactionAttribute) editor.getValue();
attr.getRollbackRules().add(new RollbackRuleAttribute(Exception.class));
assertTrue(attr.rollbackOn(new Exception("")));
assertFalse(attr.rollbackOn(new RuntimeException("")));
assertFalse(attr.rollbackOn(new SkippableException("")));
}
/**
* Scenario: Exception in reader that should not cause rollback