### Question:
CloudAppRestfulApi { @PUT @Consumes(MediaType.APPLICATION_JSON) public void update(final CloudAppConfiguration appConfig) { appConfigService.update(appConfig); } CloudAppRestfulApi(); static void init(final CoordinatorRegistryCenter regCenter, final ProducerManager producerManager); @POST @Consumes(MediaType.APPLICATION_JSON) void register(final CloudAppConfiguration appConfig); @PUT @Consumes(MediaType.APPLICATION_JSON) void update(final CloudAppConfiguration appConfig); @GET @Path("/{appName}") @Consumes(MediaType.APPLICATION_JSON) Response detail(@PathParam("appName") final String appName); @GET @Path("/list") @Produces(MediaType.APPLICATION_JSON) Collection<CloudAppConfiguration> findAllApps(); @GET @Path("/{appName}/disable") @Produces(MediaType.APPLICATION_JSON) boolean isDisabled(@PathParam("appName") final String appName); @POST @Path("/{appName}/disable") void disable(@PathParam("appName") final String appName); @POST @Path("/{appName}/enable") void enable(@PathParam("appName") final String appName); @DELETE @Path("/{appName}") @Consumes(MediaType.APPLICATION_JSON) void deregister(@PathParam("appName") final String appName);  }### Answer:
@Test public void assertUpdate() throws Exception { Mockito.when(getRegCenter().isExisted("/config/app/test_app")).thenReturn(true); Mockito.when(getRegCenter().get("/config/app/test_app")).thenReturn(CloudAppJsonConstants.getAppJson("test_app")); Assert.assertThat(RestfulTestsUtil.sentRequest("http: Mockito.verify(getRegCenter()).update("/config/app/test_app", CloudAppJsonConstants.getAppJson("test_app")); }