### Question:
JsonToBean { public static CoordinatorJob createCoordinatorJob(JSONObject json) { return (CoordinatorJob) Proxy.newProxyInstance(JsonToBean.class.getClassLoader(), new Class[]{CoordinatorJob.class}, new JsonInvocationHandler(COORD_JOB, json)); }  static WorkflowAction createWorkflowAction(JSONObject json); static List<WorkflowAction> createWorkflowActionList(JSONArray json); static WorkflowJob createWorkflowJob(JSONObject json); static List<WorkflowJob> createWorkflowJobList(JSONArray json); static CoordinatorAction createCoordinatorAction(JSONObject json); static List<CoordinatorAction> createCoordinatorActionList(JSONArray json); static CoordinatorJob createCoordinatorJob(JSONObject json); static JMSConnectionInfo createJMSConnectionInfo(JSONObject json); static List<CoordinatorJob> createCoordinatorJobList(JSONArray json); static BundleJob createBundleJob(JSONObject json); static List<BundleJob> createBundleJobList(JSONArray json); static BulkResponse createBulkResponse(JSONObject json); static List<BulkResponse> createBulkResponseList(JSONArray json); static List<String> createBulkWriteJobIdList(JSONArray json);  }### Answer:
@SuppressWarnings("unchecked") @Test 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(CREATED_TIME), job.getCreatedTime()); assertEquals(JsonUtils.parseDateRfc822(START_TIME), job.getStartTime()); assertEquals(JsonUtils.parseDateRfc822(END_TIME), job.getEndTime()); assertEquals(JsonUtils.parseDateRfc822(PAUSE_TIME), job.getPauseTime()); 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()); json.put(JsonTags.COORDINATOR_JOB_FREQUENCY, 1L); CoordinatorJob oozie3xjob = JsonToBean.createCoordinatorJob(json); assertEquals("1", oozie3xjob.getFrequency()); }