@Test public void testUnableToResolve() throws Exception { final DnsResolver resolver = mock(DnsResolver.class); when(resolver.resolve("example.com")).thenThrow(new UnknownHostException()); when(resolver.resolve("example.net")).thenThrow(new UnknownHostException()); final List<Endpoint> endpoints = Endpoints.of(uris, resolver); assertThat(endpoints.size(), equalTo(0)); }
public static Supplier<List<Endpoint>> of(final Supplier<List<URI>> uriSupplier) { return of(uriSupplier, DEFAULT_DNS_RESOLVER); }
Endpoints { public static Supplier<List<Endpoint>> of(final Supplier<List<URI>> uriSupplier) { return of(uriSupplier, DEFAULT_DNS_RESOLVER); } }
Endpoints { public static Supplier<List<Endpoint>> of(final Supplier<List<URI>> uriSupplier) { return of(uriSupplier, DEFAULT_DNS_RESOLVER); } private  Endpoints(); }
Endpoints { public static Supplier<List<Endpoint>> of(final Supplier<List<URI>> uriSupplier) { return of(uriSupplier, DEFAULT_DNS_RESOLVER); } private  Endpoints(); static Supplier<List<Endpoint>> of(final Supplier<List<URI>> uriSupplier); static List<Endpoint> of(final List<URI> uris); }
Endpoints { public static Supplier<List<Endpoint>> of(final Supplier<List<URI>> uriSupplier) { return of(uriSupplier, DEFAULT_DNS_RESOLVER); } private  Endpoints(); static Supplier<List<Endpoint>> of(final Supplier<List<URI>> uriSupplier); static List<Endpoint> of(final List<URI> uris);  }