@Test
    void verifyReadFromLocalStorage() throws Exception {
        val ticketGrantingTicket = new MockTicketGrantingTicket("casuser");
        ticketRegistry.addTicket(ticketGrantingTicket);
        
        val context = MockRequestContext.create(applicationContext).withUserAgent("Firefox");
        val request = context.getHttpServletRequest();
        context.setRemoteAddr("185.86.151.11").setLocalAddr("185.88.151.11").setClientInfo();

        var storage = DefaultBrowserStorage.builder()
            .build()
            .setPayloadJson(Map.of(ticketGrantingTicketCookieGenerator.getCookieName(), ticketGrantingTicket.getId()));

        context.setParameter(BrowserStorage.PARAMETER_BROWSER_STORAGE, MAPPER.writeValueAsString(Map.of(storage.getContext(), storage.getPayload())));
        ClientInfoHolder.setClientInfo(ClientInfo.from(request));

        context.setCurrentEvent(new Event(this, CasWebflowConstants.TRANSITION_ID_SUCCESS,
            new LocalAttributeMap<>(TicketGrantingTicket.class.getName(), ticketGrantingTicket.getId())));

        context.getRequestScope().put(BrowserStorage.BrowserStorageTypes.class.getSimpleName(), BrowserStorage.BrowserStorageTypes.LOCAL.name());
        val readResult = readSessionStorageAction.execute(context);
        storage = WebUtils.getBrowserStorage(context);
        assertNotNull(storage);
        assertEquals(BrowserStorage.BrowserStorageTypes.LOCAL, storage.getStorageType());
        assertEquals(CasWebflowConstants.TRANSITION_ID_SUCCESS, readResult.getId());
        assertNotNull(WebUtils.getTicketGrantingTicketId(context));
        storage = readResult.getAttributes().get(BrowserStorage.PARAMETER_BROWSER_STORAGE, BrowserStorage.class);
        assertNotNull(storage);
    }
This is {@link BrowserStorageActionTests}.

@author Misagh Moayyed
@since 7.0.0
core/cas-server-core-webflow/src/test/java/org/apereo/cas/web/flow/actions/BrowserStorageActionTests.java