@Test public void provided() { for (NameResolverProvider current : InternalServiceProviders.getCandidatesViaServiceLoader( NameResolverProvider.class, getClass().getClassLoader())) { if (current instanceof DnsNameResolverProvider) { return; } } fail("DnsNameResolverProvider not registered"); }
@Test public void providedHardCoded() { for (NameResolverProvider current : InternalServiceProviders.getCandidatesViaHardCoded( NameResolverProvider.class, InternalNameResolverProvider.HARDCODED_CLASSES)) { if (current instanceof DnsNameResolverProvider) { return; } } fail("DnsNameResolverProvider not registered"); }