### Question:
DefaultJwtTokenValidator implements JwtTokenValidator { @Override public void assertValidToken(String tokenString) throws JwtTokenValidatorException { assertValidToken(tokenString, null); } DefaultJwtTokenValidator(
        String issuer,
        List<String> acceptedAudience,
        RemoteJWKSet<SecurityContext> remoteJWKSet
    ); @Override void assertValidToken(String tokenString); void assertValidToken(String tokenString, String expectedNonce);  }### Answer:
@Test public void testAssertValidToken() throws JwtTokenValidatorException { JwtTokenValidator validator = createOIDCTokenValidator(ISSUER, Collections.singletonList("aud1")); JWT token = createSignedJWT(ISSUER, "aud1", SUB); validator.assertValidToken(token.serialize()); }
@Test public void testAssertUnexpectedIssuer() throws JwtTokenValidatorException { JwtTokenValidator validator = createOIDCTokenValidator("https: Collections.singletonList("aud1")); JWT token = createSignedJWT(ISSUER, "aud1", SUB); assertThrows(JwtTokenValidatorException.class, () -> validator.assertValidToken(token.serialize())); }
@Test public void testAssertUnknownAudience() throws JwtTokenValidatorException { JwtTokenValidator validator = createOIDCTokenValidator(ISSUER, Collections.singletonList("aud1")); JWT token = createSignedJWT(ISSUER, "unknown", SUB); assertThrows(JwtTokenValidatorException.class, () -> validator.assertValidToken(token.serialize())); }