### Question:
CloudJobRestfulApi { @PUT @Path("/update") @Consumes(MediaType.APPLICATION_JSON) public void update(final CloudJobConfiguration jobConfig) { producerManager.update(jobConfig); } CloudJobRestfulApi(); static void init(final CoordinatorRegistryCenter regCenter, final ProducerManager producerManager); @POST @Path("/register") @Consumes(MediaType.APPLICATION_JSON) void register(final CloudJobConfiguration jobConfig); @PUT @Path("/update") @Consumes(MediaType.APPLICATION_JSON) void update(final CloudJobConfiguration jobConfig); @DELETE @Path("/deregister") @Consumes(MediaType.APPLICATION_JSON) void deregister(final String jobName); @GET @Path("/{jobName}/disable") @Produces(MediaType.APPLICATION_JSON) boolean isDisabled(@PathParam("jobName") final String jobName); @POST @Path("/{jobName}/enable") void enable(@PathParam("jobName") final String jobName); @POST @Path("/{jobName}/disable") void disable(@PathParam("jobName") final String jobName); @POST @Path("/trigger") @Consumes(MediaType.APPLICATION_JSON) void trigger(final String jobName); @GET @Path("/jobs/{jobName}") @Consumes(MediaType.APPLICATION_JSON) Response detail(@PathParam("jobName") final String jobName); @GET @Path("/jobs") @Consumes(MediaType.APPLICATION_JSON) Collection<CloudJobConfiguration> findAllJobs(); @GET @Path("tasks/running") @Consumes(MediaType.APPLICATION_JSON) Collection<TaskContext> findAllRunningTasks(); @GET @Path("tasks/ready") @Consumes(MediaType.APPLICATION_JSON) Collection<Map<String, String>> findAllReadyTasks(); @GET @Path("tasks/failover") @Consumes(MediaType.APPLICATION_JSON) Collection<FailoverTaskInfo> findAllFailoverTasks(); @GET @Path("events/executions") @Consumes(MediaType.APPLICATION_JSON) JobEventRdbSearch.Result<JobExecutionEvent> findJobExecutionEvents(@Context final UriInfo info); @GET @Path("events/statusTraces") @Consumes(MediaType.APPLICATION_JSON) JobEventRdbSearch.Result<JobStatusTraceEvent> findJobStatusTraceEvents(@Context final UriInfo info); @GET @Path("/statistics/tasks/results") @Consumes(MediaType.APPLICATION_JSON) List<TaskResultStatistics> findTaskResultStatistics(@QueryParam("since") final String since); @GET @Path("/statistics/tasks/results/{period}") @Consumes(MediaType.APPLICATION_JSON) TaskResultStatistics getTaskResultStatistics(@PathParam("period") final String period); @GET @Path("/statistics/tasks/running") @Consumes(MediaType.APPLICATION_JSON) List<TaskRunningStatistics> findTaskRunningStatistics(@QueryParam("since") final String since); @GET @Path("/statistics/jobs/type") @Consumes(MediaType.APPLICATION_JSON) JobTypeStatistics getJobTypeStatistics(); @GET @Path("/statistics/jobs/executionType") @Consumes(MediaType.APPLICATION_JSON) JobExecutionTypeStatistics getJobExecutionTypeStatistics(); @GET @Path("/statistics/jobs/running") @Consumes(MediaType.APPLICATION_JSON) List<JobRunningStatistics> findJobRunningStatistics(@QueryParam("since") final String since); @GET @Path("/statistics/jobs/register") @Consumes(MediaType.APPLICATION_JSON) List<JobRegisterStatistics> findJobRegisterStatistics();  }### Answer:
@Test public void assertUpdate() throws Exception { Mockito.when(getRegCenter().isExisted("/config/job/test_job")).thenReturn(true); Mockito.when(getRegCenter().get("/config/job/test_job")).thenReturn(CloudJsonConstants.getJobJson()); Assert.assertThat(RestfulTestsUtil.sentRequest("http: Mockito.verify(getRegCenter()).update("/config/job/test_job", CloudJsonConstants.getJobJson()); RestfulTestsUtil.sentRequest("http: }