### Question:
SpecimenTracer implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { return createAndTraceSpecimen(request, context); } SpecimenTracer(SpecimenBuilder builder,
                          TracingStrategy tracingStrategy,
                          Appendable traceWriter); @Override Object create(Object request, SpecimenContext context); Appendable getTraceWriter(); TracingStrategy getTracingStrategy();  }### Answer:
@Test public void tells_strategy_to_write_the_request() throws IOException { Object request = new Object(); this.tracer.create(request, this.mockContext); verify(mockStrategy).writeRequest(this.mockAppendable, request); }
@Test public void tells_strategy_to_write_response_if_not_no_specimen() throws IOException { Object request = new Object(); Object response = new Object(); when(this.mockBuilder.create(request, this.mockContext)).thenReturn(response); this.tracer.create(request, this.mockContext); verify(this.mockStrategy).writeCreated(this.mockAppendable, request, response); }
@Test public void doest_not_tell_strategy_to_write_response_if_no_specimen() throws IOException { Object request = new Object(); Object response = new NoSpecimen(); when(this.mockBuilder.create(request, this.mockContext)).thenReturn(response); this.tracer.create(request, this.mockContext); verify(this.mockStrategy, never()).writeCreated(this.mockAppendable, request, response); }