@Test
public void testLoadHttpsPemCert() throws Exception {

    JWTAuthContextInfo contextInfo = new JWTAuthContextInfo("https://github.com/my_key.crt", "issuer");
    contextInfo.setJwksRefreshInterval(10);
    Mockito.doThrow(new JoseException("")).when(mockedHttpsJwks).refresh();
    Mockito.doReturn(ResourceUtils.getAsClasspathResource("publicCrt.pem"))
            .when(urlResolver).resolve(Mockito.any());
    X509KeyLocationResolver keyLocationResolver = new X509KeyLocationResolver(contextInfo) {
        protected HttpsJwks initializeHttpsJwks(String loc) {
            return mockedHttpsJwks;
        }
        protected UrlStreamResolver getUrlResolver() {
            return urlResolver;
        }
    };
    when(signature.getX509CertSha1ThumbprintHeaderValue()).thenReturn(x5t);
    assertEquals(key, keyLocationResolver.resolveKey(signature, emptyList()));
}