### Question:
TokenValidationContext { public Optional<JwtToken> getFirstValidToken() { return issuerShortNameValidatedTokenMap.values().stream().findFirst(); } TokenValidationContext(Map<String, JwtToken> issuerShortNameValidatedTokenMap); Optional<JwtToken> getJwtTokenAsOptional(String issuerName); Optional<JwtToken> getFirstValidToken(); JwtToken getJwtToken(String issuerName); JwtTokenClaims getClaims(String issuerName); Optional<JwtTokenClaims> getAnyValidClaims(); boolean hasValidToken(); boolean hasTokenFor(String issuerName); List<String> getIssuers();  }### Answer:
@Test public void getFirstValidToken() { Map<String, JwtToken> map = new ConcurrentHashMap<>(); TokenValidationContext tokenValidationContext = new TokenValidationContext(map); assertThat(tokenValidationContext.getFirstValidToken()).isEmpty(); assertThat(tokenValidationContext.hasValidToken()).isFalse(); JwtToken jwtToken1 = jwtToken("https: JwtToken jwtToken2 = jwtToken("https: map.put("issuer2", jwtToken2); map.put("issuer1", jwtToken1); assertThat(tokenValidationContext.getFirstValidToken()).hasValueSatisfying(jwtToken -> jwtToken.getIssuer().equals(jwtToken2.getIssuer())); }