buildResource("/factory/test", EMPTY_RESOURCE_LIST, resourceResolver, factoryResourceProvider);
HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
Mockito.when(request.getScheme()).thenReturn("http");
Mockito.when(request.getServerPort()).thenReturn(80);
Mockito.when(request.getServerName()).thenReturn("localhost");
String path = resourceResolver.map(request,"/factory/test?q=123123");
Assert.assertEquals("/factory/test?q=123123", path);
path = resourceResolver.map(request,"/factory/test");
Assert.assertEquals("/factory/test", path);
// test path mapping without a request.