@Test public void testApplySetAndGetBasicConfig() { Configuration config = new Configuration(); String srcRoot = "/foo"; config.setSourceRoot(srcRoot); String configStr = config.getXMLRepresentationAsString(); target("configuration") .request() .put(Entity.xml(configStr)); assertEquals(env.getSourceRootPath(), srcRoot); String returnedConfig = target("configuration") .request() .get(String.class); assertEquals(configStr, returnedConfig); }
@GET @Produces(MediaType.APPLICATION_XML) public String get() { return env.getConfigurationXML(); }
ConfigurationController { @GET @Produces(MediaType.APPLICATION_XML) public String get() { return env.getConfigurationXML(); } }
ConfigurationController { @GET @Produces(MediaType.APPLICATION_XML) public String get() { return env.getConfigurationXML(); }  }
ConfigurationController { @GET @Produces(MediaType.APPLICATION_XML) public String get() { return env.getConfigurationXML(); }  @GET @Produces(MediaType.APPLICATION_XML) String get(); @PUT @Consumes(MediaType.APPLICATION_XML) void set(final String body, @QueryParam("reindex") final boolean reindex); @GET @Path("/{field}") @Produces(MediaType.APPLICATION_JSON) Object getField(@PathParam("field") final String field); @PUT @Path("/{field}") void setField(@PathParam("field") final String field, final String value); @POST @Path("/authorization/reload") void reloadAuthorization(); }
ConfigurationController { @GET @Produces(MediaType.APPLICATION_XML) public String get() { return env.getConfigurationXML(); }  @GET @Produces(MediaType.APPLICATION_XML) String get(); @PUT @Consumes(MediaType.APPLICATION_XML) void set(final String body, @QueryParam("reindex") final boolean reindex); @GET @Path("/{field}") @Produces(MediaType.APPLICATION_JSON) Object getField(@PathParam("field") final String field); @PUT @Path("/{field}") void setField(@PathParam("field") final String field, final String value); @POST @Path("/authorization/reload") void reloadAuthorization();  }