@Test
    void verifyStorageRead() throws Throwable {
        val context1 = MockRequestContext.create();
        context1.setContentType(MediaType.APPLICATION_FORM_URLENCODED_VALUE);
        context1.setParameter(BrowserStorage.PARAMETER_BROWSER_STORAGE, "test");
        assertTrue(WebUtils.getBrowserStoragePayload(context1).isPresent());
        assertTrue(WebUtils.getRequestParameterOrAttribute(context1, BrowserStorage.PARAMETER_BROWSER_STORAGE).isPresent());

        val context2 = MockRequestContext.create();
        context2.setMethod(HttpMethod.POST);
        context2.setContentType(MediaType.APPLICATION_FORM_URLENCODED_VALUE);
        context2.setContent(BrowserStorage.PARAMETER_BROWSER_STORAGE + '=' + UUID.randomUUID());
        assertTrue(WebUtils.getBrowserStoragePayload(context2).isPresent());
        assertNotNull(context2.getHttpServletRequest().getAttribute(BrowserStorage.PARAMETER_BROWSER_STORAGE));

        val context3 = MockRequestContext.create();
        context3.setMethod(HttpMethod.POST);
        context3.setContentType(MediaType.APPLICATION_FORM_URLENCODED_VALUE);
        assertTrue(WebUtils.getBrowserStoragePayload(context3).isEmpty());
    }
This is {@link WebUtilsTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-web/src/test/java/org/apereo/cas/web/support/WebUtilsTests.java