DefaultHostsFileEntriesResolver implements HostsFileEntriesResolver { String normalize(String inetHost) { return inetHost.toLowerCase(Locale.ENGLISH); } DefaultHostsFileEntriesResolver();   DefaultHostsFileEntriesResolver(HostsFileEntries entries); @Override InetAddress address(String inetHost, ResolvedAddressTypes resolvedAddressTypes);  }
@Test public void testCaseInsensitivity() throws Exception { DefaultHostsFileEntriesResolver resolver = new DefaultHostsFileEntriesResolver(); Assert.assertEquals(resolver.normalize("localhost"), resolver.normalize("LOCALHOST")); }