@Test
    void verifySetGet() {
        assertTrue(sessionStore.getSessionId(webContext, false).isEmpty());
        sessionStore.set(webContext, "attribute", "test");
        assertTrue(sessionStore.getSessionId(webContext, false).isPresent());
        var value = sessionStore.get(webContext, "attribute");
        assertTrue(value.isPresent());
        assertEquals("test", value.get());

        sessionStore.set(webContext, "attribute", "test2");
        value = sessionStore.get(webContext, "attribute");
        assertTrue(value.isPresent());
        assertEquals("test2", value.get());

        sessionStore.set(webContext, "attribute", null);
        sessionStore.set(webContext, "attribute2", "test3");
        assertFalse(sessionStore.get(webContext, "attribute").isPresent());
        value = sessionStore.get(webContext, "attribute2");
        assertTrue(value.isPresent());
        assertEquals("test3", value.get());

        assertDoesNotThrow(() -> sessionStore.set(webContext, "not-serializable", new NoSerializable()));
        sessionStore.destroySession(webContext);
        value = sessionStore.get(webContext, "attribute");
        assertTrue(value.isEmpty());

        assertTrue(sessionStore.getSessionId(webContext, false).isPresent());
    }
This is {@link TicketRegistrySessionStoreTests}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-pac4j-api/src/test/java/org/apereo/cas/integration/pac4j/TicketRegistrySessionStoreTests.java