Code example for IdentityHashMap

Methods: get, put

0
			return; 
		} 
		fail(
				"Failed to throw IllegalArgumentException for initial capacity < 0"); 
 
		IdentityHashMap empty = new IdentityHashMap(0);
		assertNull("Empty IdentityHashMap access", empty.get("nothing"));
		empty.put("something", "here");
		assertTrue("cannot get element", empty.get("something") == "here");
	} 
 
	/** 
	 * @tests java.util.IdentityHashMap#IdentityHashMap(java.util.Map) 
	 */ 
	public void test_ConstructorLjava_util_Map() { 
		// Test for method java.util.IdentityHashMap(java.util.Map) 
		Map myMap = new TreeMap();
		for (int counter = 0; counter < hmSize; counter++)
			myMap.put(objArray2[counter], objArray[counter]);
		IdentityHashMap hm2 = new IdentityHashMap(myMap);
		for (int counter = 0; counter < hmSize; counter++)