@Test
public void testBuildOfHttpRequest() {

    HttpServletRequest httpRequest = mock(HttpServletRequest.class);
    when(httpRequest.getServletPath()).thenReturn("/servletPath");
    when(httpRequest.getPathInfo()).thenReturn("/pathInfo");
    when(httpRequest.getHeaderNames()).thenReturn(enumerationOf("Content-Type"));
    Map<String, Object> mappedRequest = ErrorResponses.buildHttpRequestContext(httpRequest);
    assertThat(mappedRequest.get("relativeURI"), is(equalTo("/servletPath/pathInfo")));
}