### Question:
AuthScope { @Override public int hashCode() { int hash = LangUtils.HASH_SEED; hash = LangUtils.hashCode(hash, this.protocol); hash = LangUtils.hashCode(hash, this.host); hash = LangUtils.hashCode(hash, this.port); hash = LangUtils.hashCode(hash, this.realm); hash = LangUtils.hashCode(hash, toNullSafeLowerCase(this.schemeName)); return hash; } AuthScope(
            final String protocol,
            final String host,
            final int port,
            final String realm,
            final String schemeName);  AuthScope(
            final HttpHost origin,
            final String realm,
            final String schemeName);  AuthScope(final HttpHost origin);  AuthScope(final String host, final int port);  AuthScope(final AuthScope authScope); String getProtocol(); String getHost(); int getPort(); String getRealm(); String getSchemeName(); int match(final AuthScope that); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testHash() { final AuthScope authscope1 = new AuthScope("http", "somehost", 80, "somerealm", "somescheme"); final AuthScope authscope2 = new AuthScope("http", "someotherhost", 80, "somerealm", "somescheme"); final AuthScope authscope3 = new AuthScope("http", "somehost", 80, "somerealm", "somescheme"); final AuthScope authscope4 = new AuthScope("http", "somehost", 8080, "somerealm", "somescheme"); final AuthScope authscope5 = new AuthScope("http", "somehost", 80, "someotherrealm", "somescheme"); final AuthScope authscope6 = new AuthScope("http", "somehost", 80, "somerealm", "someotherscheme"); final AuthScope authscope7 = new AuthScope("https", "somehost", 80, "somerealm", "somescheme"); final AuthScope authscope8 = new AuthScope("https", "somehost", 80, "somerealm", "SomeScheme"); Assert.assertTrue(authscope1.hashCode() == authscope1.hashCode()); Assert.assertFalse(authscope1.hashCode() == authscope2.hashCode()); Assert.assertTrue(authscope1.hashCode() == authscope3.hashCode()); Assert.assertFalse(authscope1.hashCode() == authscope4.hashCode()); Assert.assertFalse(authscope1.hashCode() == authscope5.hashCode()); Assert.assertFalse(authscope1.hashCode() == authscope6.hashCode()); Assert.assertFalse(authscope1.hashCode() == authscope7.hashCode()); Assert.assertTrue(authscope7.hashCode() == authscope8.hashCode()); }