@Test (timeout=60000)
public void testLookupWithHostsFallback() throws Exception {

  assumeNotWindows();
  final String oldHostname = changeDnsCachedHostname(DUMMY_HOSTNAME);
  try {
    String hostname = DNS.getDefaultHost(
        getLoopbackInterface(), INVALID_DNS_SERVER, true);
    // Expect to get back something other than the cached host name.
    assertThat(hostname, not(DUMMY_HOSTNAME));
  } finally {
    // Restore DNS#cachedHostname for subsequent tests.
    changeDnsCachedHostname(oldHostname);
  }
}