public void when_last_fails_first_should_be_rolledbacked() {
final String firstVal = "FIRST";
final String secVal = "SEC";
atomicInsert.of(new AtomicInsertOperation() {
@Override
public void execute(Insertion insertion) throws SQLException {
Simple first = new Simple(firstVal);
insertion.of(first);
Other other = new Other(first, "REP");
insertion.of(other);
}
});
try {
atomicInsert.of(new AtomicInsertOperation() {
@Override
public void execute(Insertion insertion) throws SQLException {
Simple second = new Simple(secVal);
insertion.of(second);