4849505152535455565758
success = true; } finally { if (success) { batch.close(); } else { batch.discard(); } } return null; } }
7071727374757677787980
verify(this.tm).begin(); assertSame(tx, batch.getTransaction()); batch.discard(); verify(this.tm).rollback(); } @Test
919293949596979899100101
batch.close(); verify(this.tm, never()).commit(); batch.discard(); verify(this.tm, never()).rollback(); } @Test