JwtsSigningKeyResolver implements SigningKeyResolver { URLConnection getConnection(final String serverUrl) throws IOException { return new URL(serverUrl).openConnection(); } JwtsSigningKeyResolver(final String serverUrl, final SSLContext sslContext);  JwtsSigningKeyResolver(final String serverUrl, final SSLContext sslContext, boolean skipConfig); @Override Key resolveSigningKey(JwsHeader jwsHeader, Claims claims); @Override Key resolveSigningKey(JwsHeader jwsHeader, String body); void addPublicKey(final String keyId, final PublicKey publicKey); static final String ZTS_PROP_ATHENZ_CONF; }
@Test public void testGetConnection() throws IOException { final String oldConf = System.setProperty(JwtsSigningKeyResolver.ZTS_PROP_ATHENZ_CONF, "src/test/resources/athenz.conf"); JwtsSigningKeyResolver resolver = new JwtsSigningKeyResolver(null, null); URLConnection con = resolver.getConnection("https: assertNotNull(con); if (oldConf == null) { System.clearProperty(JwtsSigningKeyResolver.ZTS_PROP_ATHENZ_CONF); } else { System.setProperty(JwtsSigningKeyResolver.ZTS_PROP_ATHENZ_CONF, oldConf); } }