ProxyProvider { @Override public int hashCode() { return Objects.hash( username, getPasswordValue(), getAddress().get(), getNonProxyHostsValue(), httpHeaders.get(), getType(), connectTimeoutMillis); } ProxyProvider(ProxyProvider.Build builder); static ProxyProvider.TypeSpec builder(); final Proxy getType(); final Supplier<? extends InetSocketAddress> getAddress(); final Predicate<SocketAddress> getNonProxyHostsPredicate(); final ProxyHandler newProxyHandler(); boolean shouldProxy(SocketAddress address); void addProxyHandler(Channel channel); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void equalProxyProviders() { assertEquals(createProxy(ADDRESS_1, PASSWORD_1), createProxy(ADDRESS_1, PASSWORD_1)); assertEquals(createProxy(ADDRESS_1, PASSWORD_1).hashCode(), createProxy(ADDRESS_1, PASSWORD_1).hashCode()); }
@Test public void equalProxyProvidersNoAuth() { assertEquals(createNoAuthProxy(ADDRESS_1), createNoAuthProxy(ADDRESS_1)); assertEquals(createNoAuthProxy(ADDRESS_1).hashCode(), createNoAuthProxy(ADDRESS_1).hashCode()); }
@Test public void equalProxyProvidersAuthHeader() { assertEquals(createHeaderProxy(ADDRESS_1, HEADER_1), createHeaderProxy(ADDRESS_1, HEADER_1)); assertEquals(createHeaderProxy(ADDRESS_1, HEADER_1).hashCode(), createHeaderProxy(ADDRESS_1, HEADER_1).hashCode()); }
@Test public void differentAddresses() { assertNotEquals(createProxy(ADDRESS_1, PASSWORD_1), createProxy(ADDRESS_2, PASSWORD_1)); assertNotEquals(createProxy(ADDRESS_1, PASSWORD_1).hashCode(), createProxy(ADDRESS_2, PASSWORD_1).hashCode()); }
@Test public void differentPasswords() { assertNotEquals(createProxy(ADDRESS_1, PASSWORD_1), createProxy(ADDRESS_1, PASSWORD_2)); assertNotEquals(createProxy(ADDRESS_1, PASSWORD_1).hashCode(), createProxy(ADDRESS_1, PASSWORD_2).hashCode()); }
@Test public void differentAuthHeaders() { assertNotEquals(createHeaderProxy(ADDRESS_1, HEADER_1), createHeaderProxy(ADDRESS_1, HEADER_2)); assertNotEquals(createHeaderProxy(ADDRESS_1, HEADER_1).hashCode(), createHeaderProxy(ADDRESS_1, HEADER_2).hashCode()); }
@Test public void differentConnectTimeout() { assertNotEquals(createConnectTimeoutProxy(CONNECT_TIMEOUT_1), createConnectTimeoutProxy(CONNECT_TIMEOUT_2)); assertNotEquals(createConnectTimeoutProxy(CONNECT_TIMEOUT_1).hashCode(), createConnectTimeoutProxy(CONNECT_TIMEOUT_2).hashCode()); }