};
RequestCycle requestCycle = mock(RequestCycle.class);
when(requestCycle.urlFor(any(IRequestHandler.class))).thenReturn(RESOURCE_NAME);
Request request = mock(Request.class);
when(request.getCharset()).thenReturn(Charset.defaultCharset());
when(requestCycle.getRequest()).thenReturn(request);
UrlRenderer urlRenderer = mock(UrlRenderer.class);
when(urlRenderer.renderContextRelativeUrl((any(String.class)))).thenReturn(RESOURCE_NAME);
when(requestCycle.getUrlRenderer()).thenReturn(urlRenderer);