### Question:
HydraOkHttp3ClientHttpRequestFactory implements ClientHttpRequestFactory, AsyncClientHttpRequestFactory { protected boolean isUriToBeIgnoredByProxy(String host) { MainConfig mainConfig = configProvider.getBaseConfig().getMain(); if (mainConfig.isProxyIgnoreLocal()) { Boolean ipToLong = isHostInLocalNetwork(host); if (ipToLong != null) { return ipToLong; } } if (mainConfig.getProxyIgnoreDomains() == null || mainConfig.getProxyIgnoreDomains().isEmpty()) { return false; } return mainConfig.getProxyIgnoreDomains().stream().anyMatch(x -> isSameHost(x, host)); }  @PostConstruct void init(); @EventListener void handleConfigChangedEvent(ConfigChangedEvent event); @Override ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod); @Override AsyncClientHttpRequest createAsyncRequest(URI uri, HttpMethod httpMethod); Builder getOkHttpClientBuilder(URI requestUri); static long ipToLong(InetAddress ip);  }### Answer:
@Test public void shouldRecognizeLocalIps() { assertThat(testee.isUriToBeIgnoredByProxy("localhost"), is(true)); assertThat(testee.isUriToBeIgnoredByProxy("127.0.0.1"), is(true)); assertThat(testee.isUriToBeIgnoredByProxy("192.168.1.1"), is(true)); assertThat(testee.isUriToBeIgnoredByProxy("192.168.240.3"), is(true)); assertThat(testee.isUriToBeIgnoredByProxy("10.0.240.3"), is(true)); assertThat(testee.isUriToBeIgnoredByProxy("8.8.8.8"), is(false)); }
@Test public void shouldRecognizeIgnoredDomains() { assertThat(testee.isUriToBeIgnoredByProxy("mydomain.com"), is(true)); assertThat(testee.isUriToBeIgnoredByProxy("github.com"), is(true)); assertThat(testee.isUriToBeIgnoredByProxy("subdomain.otherdomain.net"), is(true)); assertThat(testee.isUriToBeIgnoredByProxy("subdomain.otherDOmain.NET"), is(true)); assertThat(testee.isUriToBeIgnoredByProxy("subdomain.otherdomain.ORG"), is(false)); assertThat(testee.isUriToBeIgnoredByProxy("somedomain.com"), is(false)); }