}
@Test
public void testOnStart() {
DefaultWebSessionManager mgr = new DefaultWebSessionManager();
Cookie cookie = createMock(Cookie.class);
mgr.setSessionIdCookie(cookie);
SimpleSession session = new SimpleSession();
session.setId("12345");
WebSessionContext wsc = new DefaultWebSessionContext();
wsc.setServletRequest(createMock(HttpServletRequest.class));
wsc.setServletResponse(createMock(HttpServletResponse.class));
//test that the cookie template is being used:
expect(cookie.getValue()).andReturn("blah");
expect(cookie.getComment()).andReturn("comment");
expect(cookie.getDomain()).andReturn("domain");
expect(cookie.getMaxAge()).andReturn(SimpleCookie.DEFAULT_MAX_AGE);
expect(cookie.getName()).andReturn(ShiroHttpSession.DEFAULT_SESSION_ID_NAME);
expect(cookie.getPath()).andReturn("/");
expect(cookie.getVersion()).andReturn(SimpleCookie.DEFAULT_VERSION);
expect(cookie.isSecure()).andReturn(true);
expect(cookie.isHttpOnly()).andReturn(true);
replay(cookie);
mgr.onStart(session, wsc);