}
@SuppressWarnings("unchecked")
public void testParseCoordinatorJob() {
JSONObject json = createJsonCoordinatorJob();
CoordinatorJob job = JsonToBean.createCoordinatorJob(json);
assertEquals("a", job.getAppPath());
assertEquals("b", job.getAppName());
assertEquals("c", job.getId());
assertEquals("d", job.getConf());
assertEquals(CoordinatorJob.Status.RUNNING, job.getStatus());
assertEquals(CoordinatorJob.Execution.FIFO, job.getExecutionOrder());
assertEquals(1, job.getFrequency());
assertEquals(CoordinatorJob.Timeunit.DAY, job.getTimeUnit());
assertEquals("e", job.getTimeZone());
assertEquals(2, job.getConcurrency());
assertEquals(3, job.getTimeout());
assertEquals(JsonUtils.parseDateRfc822(LAST_ACTION), job.getLastActionTime());
assertEquals(JsonUtils.parseDateRfc822(NEXT_MATERIALIZED), job.getNextMaterializedTime());
assertEquals(JsonUtils.parseDateRfc822(START_TIME), job.getStartTime());
assertEquals(JsonUtils.parseDateRfc822(END_TIME), job.getEndTime());
assertEquals("f", job.getUser());
assertEquals("g", job.getGroup());
assertEquals("h", job.getConsoleUrl());
assertEquals(2, job.getActions().size());
assertEquals("ca1", job.getActions().get(0).getId());
assertEquals("ca2", job.getActions().get(1).getId());
}