@Test
    public void testNoneAlgoAllowed() {
        algorithms.add(JWSAlgorithm.parse("none"));
        when(configuration.isAllowUnsignedIdTokens()).thenReturn(true);
        final TokenValidator validator = new TokenValidator(configuration, metadata);
        final List<IDTokenValidator> validators = validator.getIdTokenValidators();
        assertEquals(1, validators.size());
        assertTrue(validators.get(0) instanceof IDTokenValidator);
    }
Tests {@link TokenValidator}.

@author Jerome LELEU
@since 5.2.0
pac4j-oidc/src/test/java/org/pac4j/oidc/profile/creator/TokenValidatorTests.java