@Test
    void handleSuccessWithoutToken() {
        val adapter = new OktaAuthenticationStateHandlerAdapter(
            new DefaultPasswordPolicyHandlingStrategy<>(), new PasswordPolicyContext());
        val response = mock(AuthenticationResponse.class);
        when(response.getSessionToken()).thenReturn(null);
        adapter.handleSuccess(response);
        assertNotNull(adapter.getFailureException());
        assertNotNull(adapter.getPasswordPolicyHandlingStrategy());
        assertNotNull(adapter.getPasswordPolicyConfiguration());
        assertThrows(FailedLoginException.class, adapter::throwExceptionIfNecessary);
    }
This is {@link OktaAuthenticationStateHandlerAdapterTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-okta-authentication/src/test/java/org/apereo/cas/okta/OktaAuthenticationStateHandlerAdapterTests.java