@GET
  @Path("{" + PATH + ":.*}")
  @Produces({ MediaType.APPLICATION_JSON })
  public Response get(@PathParam(PATH) @DefaultValue("UNKNOWN_" + PATH) final String path,
    @QueryParam(OP) @DefaultValue("UNKNOWN_" + OP) final String op) throws IOException {
    LOG.info("get: " + PATH + "=" + path + ", " + OP + "=" + op);

    final Map<String, Object> m = new TreeMap<>();
    m.put(PATH, path);
    m.put(OP, op);
    final String js = JSON.toString(m);
    return Response.ok(js).type(MediaType.APPLICATION_JSON).build();
  }
A simple Jersey resource class TestHttpServer. The servlet simply puts the path and the op
parameter in a map and return it in JSON format in the response.
hbase-http/src/test/java/org/apache/hadoop/hbase/http/resource/JerseyResource.java