public void testScopedPage() {
MockHttpServletRequest request = (MockHttpServletRequest) HDIVUtil.getHttpServletRequest();
// Put a uri that is configured as a scoped page
request.setRequestURI("/scopedPage/user.html");
IDataComposer dataComposer = this.dataComposerFactory.newInstance(request);
HDIVUtil.setDataComposer(dataComposer, request);
assertTrue(dataComposer instanceof DataComposerMemory);
dataComposer.startPage();
dataComposer.beginRequest("POST", "test.do");
dataComposer.compose("test.do", "parameter1", "2", false);
dataComposer.compose("test.do", "parameter1", "2", false);
String stateId = dataComposer.endRequest();
assertTrue(stateId.startsWith("U-"));
StateScope scope = this.stateScopeManager.getStateScope(stateId);
assertEquals("user-session", scope.getScopeName());