### Question:
OIDCCredentials { public boolean verifyClaims(final JsonWebKeySet jwks, final KeycloakConfiguration keycloakConfig) { final String issuer = keycloakConfig.getIssuer(); final String audience = keycloakConfig.getResourceId(); final JwksVerificationKeyResolver jwksKeyResolver = new JwksVerificationKeyResolver(jwks.getJsonWebKeys()); final JwtConsumer jwtConsumer = new JwtConsumerBuilder().setRequireExpirationTime() .setAllowedClockSkewInSeconds(30) .setRequireSubject() .setExpectedIssuer(issuer) .setExpectedAudience(audience) .setVerificationKeyResolver(jwksKeyResolver).setJwsAlgorithmConstraints( new AlgorithmConstraints( AlgorithmConstraints.ConstraintType.WHITELIST, AlgorithmIdentifiers.RSA_USING_SHA256)) .build(); try { jwtConsumer.processToClaims(this.getAccessToken()); return true; } catch (final InvalidJwtException e) { Log.e(TAG, "Invalid JWT provided", e); for (final ErrorCodeValidator.Error e1 : e.getErrorDetails()) { Log.e(TAG, e1.getErrorMessage()); } } return false; } OIDCCredentials(final String serialisedCredential);  OIDCCredentials(); String getAccessToken(); String getIdentityToken(); String getRefreshToken(); AuthState getAuthState(); boolean verifyClaims(final JsonWebKeySet jwks,
                    final KeycloakConfiguration keycloakConfig); boolean isExpired(); boolean getNeedsRenewal(); void setNeedsRenewal(); boolean isAuthorized(); String serialize(); static OIDCCredentials deserialize(final String serializedCredential); boolean checkValidAuth(); boolean renew(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testVerifyClaimsOk() throws Exception { OIDCCredentials testCredential = new OIDCCredentials(CREDENTIAL_AUTH_STATE) { @Override public String getAccessToken() { return VALID_ACCESS_TOKEN; } }; JsonWebKeySet keySet = new JsonWebKeySet(JWKS_CONTENT); boolean verified = testCredential.verifyClaims(keySet, keycloakConfiguration); Assert.assertTrue(verified); }
@Test public void testVerifyClaimsExpired() throws Exception { OIDCCredentials testCredential = new OIDCCredentials(CREDENTIAL_AUTH_STATE) { @Override public String getAccessToken() { return EXPIRED_ACCESS_TOKEN; } }; JsonWebKeySet keySet = new JsonWebKeySet(JWKS_CONTENT); boolean verified = testCredential.verifyClaims(keySet, keycloakConfiguration); Assert.assertFalse(verified); }