Code example for Proxy

Methods: equals, hashCode

0
		// assert hashCode 
		assertTrue(proxy1.hashCode() == proxy2.hashCode());
 
		// SOCKS type 
		Proxy proxy3 = new Proxy(Proxy.Type.SOCKS, address1);
		Proxy proxy4 = new Proxy(Proxy.Type.SOCKS, address2);
		assertTrue(proxy3.equals(proxy4));
		// assert hashCode 
		assertTrue(proxy3.hashCode() == proxy4.hashCode());
 
		// null type 
		Proxy proxy5 = new Proxy(null, address1);
		Proxy proxy6 = new Proxy(null, address2);
		assertTrue(proxy5.equals(proxy6));
	} 
 
	/** 
	 * @tests java.net.Proxy#equals(Object) 
	 */ 
	public void test_equalsLjava_lang_Object_NotEquals() { 
		SocketAddress address1 = new InetSocketAddress("127.0.0.1", 1234);