EndToEndBehaviorResource { @POST @Path("create_traces") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response createTraces(CreateTracesRequest request) throws Exception { log.info("http:create_traces request: {}", mapper.writeValueAsString(request)); behavior.generateTraces(request); return Response.ok("OK").build(); } EndToEndBehaviorResource(EndToEndBehavior endToEndBehavior); @POST @Path("create_traces") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response createTraces(CreateTracesRequest request);  }
@Test public void testCreateTraces() throws Exception { Map<String, String> tags = new HashMap<String, String>(); tags.put("key", "value"); CreateTracesRequest request = new CreateTracesRequest("const", "operation", 2, tags); resource.createTraces(request); validateSpans(reporter.getSpans(), request); }