LogbookClientFilter implements ClientRequestFilter, ClientResponseFilter, WriterInterceptor { @Override public void filter(final ClientRequestContext context) throws IOException { final LocalRequest request = new LocalRequest(context); final RequestWritingStage stage = logbook.process(request); if (context.hasEntity()) { context.setProperty("request", request); context.setProperty("write-request", stage); } else { context.setProperty("process-response", stage.write()); } request.expose(); }  @Override void filter(final ClientRequestContext context); @Override void aroundWriteTo(final WriterInterceptorContext context); @Override void filter(final ClientRequestContext request, final ClientResponseContext context);  }
@Test void filterShouldDoNothingIfStageIsNotPresent() { unit.filter(request, response); verifyNoInteractions(logbook); }