- DNSLocator dl = new DNSLocator(access, "https", "bogushost", "8100-8101");
- assertThat(dl.refresh(), is(false));
+ DNSLocator dl = new DNSLocator(access, "https", "bogushost", "8100-8101",
+ // Note: Lambda would be nice but need JDK 1.7 still
+ // PowerMock couldn't do InetAddress
+ new DNSLocator.DNSLookup() {
+ @Override
+ public InetAddress[] getAllByName(String host) throws UnknownHostException {
+ return new InetAddress[0];
+ }
+ }
+ );
+ assertThat(dl.refresh(), is(true));