@Test public void testResolve() throws Exception { final List<LookupResult> lookupResults = ImmutableList.of( LookupResult.create("master1.example.com", 443, 1, 1, 1), LookupResult.create("master2.example.com", 443, 1, 1, 1), LookupResult.create("master3.example.com", 443, 1, 1, 1) ); final URI[] expectedUris = { new URI("https: new URI("https: new URI("https: }; when(resolver.resolve("_helios._https.example.com")).thenReturn(lookupResults); final List<URI> uris = new Resolver().resolve("helios", "example.com", resolver); assertThat(uris.size(), equalTo(3)); assertThat(uris, Matchers.containsInAnyOrder(expectedUris)); }
List<URI> resolve(final String srvName, final String domain) { return resolve(srvName, domain, DEFAULT_RESOLVER); }
Resolver { List<URI> resolve(final String srvName, final String domain) { return resolve(srvName, domain, DEFAULT_RESOLVER); } }
Resolver { List<URI> resolve(final String srvName, final String domain) { return resolve(srvName, domain, DEFAULT_RESOLVER); }  }
Resolver { List<URI> resolve(final String srvName, final String domain) { return resolve(srvName, domain, DEFAULT_RESOLVER); }   }
Resolver { List<URI> resolve(final String srvName, final String domain) { return resolve(srvName, domain, DEFAULT_RESOLVER); }    }