CoordinatorJobBean coordJob = jpaService.execute(coordGetCmd);
assertEquals(DateUtils.convertDateToString(coordJob.getPauseTime()), DateUtils.convertDateToString(pauseTime));
assertEquals(Job.Status.RUNNING, coordJob.getStatus());
assertEquals(2, coordJob.getLastActionNumber());
try {
jpaService.execute(new CoordJobGetActionByActionNumberJPAExecutor(job.getId(), 3));
fail("Expected to fail as action 3 should have been deleted");
}
catch (JPAExecutorException jpae) {
assertEquals(ErrorCode.E0603, jpae.getErrorCode());
jpae.printStackTrace();
}
try {
jpaService.execute(new CoordJobGetActionByActionNumberJPAExecutor(job.getId(), 4));
fail("Expected to fail as action 4 should have been deleted");
}
catch (JPAExecutorException jpae) {
assertEquals(ErrorCode.E0603, jpae.getErrorCode());
jpae.printStackTrace();