@Test
public void testLoadJWKWithCertOnClassPathWithX5tS256() throws Exception {

    RsaJsonWebKey jwk = new RsaJsonWebKey(key);
    jwk.setOtherParameter("x5c", Collections.singletonList(x5c));
    JWTAuthContextInfo contextInfo = new JWTAuthContextInfo();
    contextInfo.setPublicKeyContent(jwk.toJson());
    X509KeyLocationResolver keyLocationResolver = new X509KeyLocationResolver(contextInfo);
    when(signature.getX509CertSha256ThumbprintHeaderValue()).thenReturn(x5tS256);
    assertEquals(key, keyLocationResolver.resolveKey(signature, emptyList()));
}