### Question:
DefaultJwtTokenValidator implements JwtTokenValidator { protected IDTokenValidator get(JWT jwt) throws ParseException, JwtTokenValidatorException { List<String> tokenAud = jwt.getJWTClaimsSet().getAudience(); for (String aud : tokenAud) { if (audienceValidatorMap.containsKey(aud)) { return audienceValidatorMap.get(aud); } } LOG.warn("Could not find validator for token audience {}", tokenAud); throw new JwtTokenValidatorException( "Could not find appropriate validator to validate token. check your config."); } DefaultJwtTokenValidator(
        String issuer,
        List<String> acceptedAudience,
        RemoteJWKSet<SecurityContext> remoteJWKSet
    ); @Override void assertValidToken(String tokenString); void assertValidToken(String tokenString, String expectedNonce);  }### Answer:
@Test public void testGetValidator() throws ParseException, JwtTokenValidatorException { List<String> aud = new ArrayList<>(); aud.add("aud1"); aud.add("aud2"); DefaultJwtTokenValidator validator = createOIDCTokenValidator(ISSUER, aud); JWT tokenAud1 = createSignedJWT(ISSUER, "aud1", SUB); assertEquals("aud1", validator.get(tokenAud1).getClientID().getValue()); JWT tokenAud2 = createSignedJWT(ISSUER, "aud2", SUB); assertEquals("aud2", validator.get(tokenAud2).getClientID().getValue()); JWT tokenUnknownAud = createSignedJWT(ISSUER, "unknown", SUB); assertThrows(JwtTokenValidatorException.class, () -> validator.get(tokenUnknownAud)); }