runTest(END_POINTS, SERVLET_CLASSES, IS_SECURITY_ENABLED, new Callable<Void>() {
public Void call() throws Exception {
String oozieUrl = getContextURL();
MockDagEngineService.reset();
String[] args = new String[]{"job", "-oozie", oozieUrl, "-info", MockDagEngineService.JOB_ID + 0};
assertEquals(0, new OozieCLI().run(args));
assertEquals(RestConstants.JOB_SHOW_INFO, MockDagEngineService.did);
args = new String[]{"job", "-localtime", "-oozie", oozieUrl, "-info", MockDagEngineService.JOB_ID + 1};
assertEquals(0, new OozieCLI().run(args));
assertEquals(RestConstants.JOB_SHOW_INFO, MockDagEngineService.did);
args = new String[]{"job", "-oozie", oozieUrl, "-info", MockDagEngineService.JOB_ID + 2};
assertEquals(0, new OozieCLI().run(args));
assertEquals(RestConstants.JOB_SHOW_INFO, MockDagEngineService.did);
args = new String[]{"job", "-oozie", oozieUrl, "-info",
MockDagEngineService.JOB_ID + (MockDagEngineService.workflows.size() + 1)};
assertEquals(-1, new OozieCLI().run(args));
return null;
}
});
}