### Question:
WorkspaceIdModifiedRequest extends HttpServletRequestWrapper { @Override public String getRequestURI() { String requestURI = super.getRequestURI(); Matcher apiResourceMatcher = API_RESOURCE_PATTERN.matcher(requestURI); if (apiResourceMatcher.find()) { return apiResourceMatcher.replaceFirst(replaceString); } return requestURI; } WorkspaceIdModifiedRequest(HttpServletRequest request, Long workspaceId); @Override String getRequestURI(); @Override StringBuffer getRequestURL();  }### Answer:
@Test public void testGetUriWithoutWorkspaceId() { when(request.getRequestURI()).thenReturn(URL_WITHOUT_WORKSPACE_ID); assertEquals(URL_WITHOUT_WORKSPACE_ID, underTest.getRequestURI()); }
@Test public void testGetUriWithWorkspace() { when(request.getRequestURI()).thenReturn(URL_WITH_DIFFERENT_WORKSPACE_ID); assertEquals(URL_WITH_TENANT_DEFAULT_WORKSPACE_ID, underTest.getRequestURI()); }