### Question:
OpenIdResolverCacheImpl implements OpenIdResolverCache { @Override public OpenIdResolver createResolver(String issuerFromJwk, String cryptoContextType, String cryptoContextValue, URL cryptoContextValueUrl) throws FailedToLoadJWKException { OpenIdResolver newResolver; if (OpenIdConnectConfig.CRYPTO_CONTEXT_TYPE_CLIENT_SECRET.equals(cryptoContextType)) { newResolver = openIdResolverFactory.createSharedSecretResolver(issuerFromJwk, cryptoContextValue); } else if (OpenIdConnectConfig.CRYPTO_CONTEXT_TYPE_CONFIG_URL.equals(cryptoContextType)) { newResolver = openIdResolverFactory.createFromOpenIDConfigUrl(cryptoContextValueUrl); if (!issuerFromJwk.equals(newResolver.getIssuer())) { throw new IllegalStateException("The specified issuer, " + issuerFromJwk + ", does not match the issuer, " + newResolver.getIssuer() + " referenced by the configuration url, " + cryptoContextValue); } } else if (OpenIdConnectConfig.CRYPTO_CONTEXT_TYPE_JWK_URL.equals(cryptoContextType)) { newResolver = openIdResolverFactory.createJWKResolver(issuerFromJwk, cryptoContextValueUrl, HttpURLConnectionManager.getReadTimeout(), HttpURLConnectionManager.getConnectTimeout()); } else { throw new IllegalArgumentException("The specified cryptoContextType, " + cryptoContextType + " was unexpected!"); } OpenIdResolver oldResolver; if ((oldResolver = resolverMap.putIfAbsent(cryptoContextValue, newResolver)) != null) { return oldResolver; } return newResolver; } @Inject  OpenIdResolverCacheImpl(OpenIdResolverFactory openIdResolverFactory); OpenIdResolver getResolverForIssuer(String cryptoContextDefinitionValue); @Override OpenIdResolver createResolver(String issuerFromJwk, String cryptoContextType, String cryptoContextValue,
                                         URL cryptoContextValueUrl);  }### Answer:
@Test(expectedExceptions = IllegalStateException.class) public void createInvalidResolver() throws MalformedURLException, FailedToLoadJWKException { cache.createResolver("issuer_string_that_does_not_match_resolver", OpenIdConnectConfig.CRYPTO_CONTEXT_TYPE_CONFIG_URL, FAUX_CONIFIG_URL_STRING, new URL(FAUX_CONIFIG_URL_STRING)); }