final Batch batchAfterStep2BeforeCommit = batchRetriever.fetchBatch(batchName);
Assert.assertNotNull("Batch after step2, before commit was null", batchAfterStep2BeforeCommit);
Assert.assertEquals("Unexpected steps in batch, after step2 before commit", successFullyCompletedSteps, batchAfterStep2BeforeCommit.getStepNames());
// now commit
userTransaction.commit();
// keep track of successfully completely steps
successFullyCompletedSteps = successFullyCompletedSteps + "," + step2;
// now retrieve and check the batch
final Batch batchAfterStep2 = batchRetriever.fetchBatch(batchName);