public void testParseBulkResponse() {
JSONObject json = createJsonBulkResponse();
BundleJob bulkBundle = JsonToBean.createBundleJob((JSONObject) json.get(JsonTags.BULK_RESPONSE_BUNDLE));
CoordinatorJob bulkCoord = JsonToBean.createCoordinatorJob((JSONObject) json.get(JsonTags.BULK_RESPONSE_COORDINATOR));
CoordinatorAction bulkAction = JsonToBean.createCoordinatorAction((JSONObject) json.get(JsonTags.BULK_RESPONSE_ACTION));
assertNotNull(bulkBundle);
assertNotNull(bulkCoord);
assertNotNull(bulkAction);
assertEquals("bundle-app", bulkBundle.getAppName());
assertEquals("bundle-id", bulkBundle.getId());
assertEquals(BundleJob.Status.RUNNING, bulkBundle.getStatus());
assertEquals("coord-app", bulkCoord.getAppName());
assertEquals(CoordinatorJob.Status.SUSPENDED, bulkCoord.getStatus());
assertEquals("action-id", bulkAction.getId());
assertEquals("coord-id", bulkAction.getJobId());
assertEquals(1, bulkAction.getActionNumber());
assertEquals("action-externalId", bulkAction.getExternalId());
assertEquals(CoordinatorAction.Status.FAILED, bulkAction.getStatus());
assertEquals("action-externalStatus", bulkAction.getExternalStatus());
assertEquals("action-errorCode", bulkAction.getErrorCode());
assertEquals("action-errorMessage", bulkAction.getErrorMessage());
assertEquals(JsonUtils.parseDateRfc822(CREATED_TIME), bulkAction.getCreatedTime());
assertEquals(JsonUtils.parseDateRfc822(NOMINAL_TIME), bulkAction.getNominalTime());
assertEquals("action-missingDeps", bulkAction.getMissingDependencies());
}