getUtil().recacheSecretToken();
grasp.forceAuthenticatedView();
// Go to a page, log out and expire session by removing cookies, log in again and verify that the user is
// redirected to the initial page.
ViewPage page = getUtil().gotoPage("SomeSpace", "SomePage");
page.logout();
// Since view is disallowed for unauthenticated users, at this point we see a log in page.
LoginPage loginPage = new LoginPage();
// Remove all cookie to simulate a session expiry
getDriver().manage().deleteAllCookies();
loginPage.loginAsAdmin();