### Question:
SanitisedHttpMessageFormatter implements HttpMessageFormatter { @Override public String formatRequest(HttpRequest request) { return request == null ? NULL : formatRequest( request.version(), request.method(), request.url(), request.id(), request.headers()); } SanitisedHttpMessageFormatter(SanitisedHttpHeaderFormatter sanitisedHttpHeaderFormatter); @Override String formatRequest(HttpRequest request); @Override String formatRequest(LiveHttpRequest request); @Override String formatResponse(HttpResponse response); @Override String formatResponse(LiveHttpResponse response); @Override String formatNettyMessage(HttpObject message); @Override Throwable wrap(Throwable t);  }### Answer:
@Test public void shouldFormatHttpRequest() { String formattedRequest = sanitisedHttpMessageFormatter.formatRequest(httpRequest); assertThat(formattedRequest, matchesPattern(HTTP_REQUEST_PATTERN)); }
@Test public void shouldFormatLiveHttpRequest() { String formattedRequest = sanitisedHttpMessageFormatter.formatRequest(httpRequest.stream()); assertThat(formattedRequest, matchesPattern(HTTP_REQUEST_PATTERN)); }