@Test
public void testRollBackOn() {

    TransactionInfo txInfo = new TransactionInfo();
    //default true
    assertThat(txInfo.rollbackOn(new IllegalArgumentException())).isTrue();
    assertThat(txInfo.rollbackOn(new Exception())).isTrue();
    assertThat(txInfo.rollbackOn(new IOException())).isTrue();
    assertThat(txInfo.rollbackOn(new NullPointerException())).isTrue();
    Set<RollbackRule> sets = getRollbackRules();
    txInfo.setRollbackRules(sets);
    assertThat(txInfo.rollbackOn(new IllegalArgumentException())).isTrue();
    assertThat(txInfo.rollbackOn(new Exception())).isTrue();
    assertThat(txInfo.rollbackOn(new IOException())).isFalse();
    assertThat(txInfo.rollbackOn(new NullPointerException())).isFalse();
    // not found return true
    assertThat(txInfo.rollbackOn(new RuntimeException())).isTrue();
}