### Question:
RequestPathResolver { public String resolveRequestPath(HttpServletRequest httpServletRequest) { return URL_PATH_HELPER.getPathWithinApplication(httpServletRequest); }  String resolveRequestPath(HttpServletRequest httpServletRequest);  }### Answer:
@Test void resolveRequestPath() { MockHttpServletRequest mockHttpServletRequest = new MockHttpServletRequest(HTTP_METHOD, "/v1/consents"); String requestPath = requestPathResolver.resolveRequestPath(mockHttpServletRequest); assertEquals("/v1/consents", requestPath); }
@Test void resolveRequestPath_withContextPath_shouldReturnPathWithoutContext() { String contextPath = "/custom-context"; MockHttpServletRequest mockHttpServletRequest = new MockHttpServletRequest(HttpMethod.GET.name(), contextPath + "/v1/consents"); mockHttpServletRequest.setContextPath(contextPath); String requestPath = requestPathResolver.resolveRequestPath(mockHttpServletRequest); assertEquals("/v1/consents", requestPath); }