public void testIntegerMap(Map<Integer,Object> map){
		Integer[] keys=new Integer[itemCount];
		Object[] values=new Object[itemCount];
		
		for(int i=0;i<itemCount;i++){
			keys[i]=i;
			values[i]=Double.valueOf(random.nextDouble());
		}
		
		map.clear();
		assertTrue(map.isEmpty());
		for(int i=0;i<itemCount;i++){
			map.put(keys[i], values[i]);
			assertTrue(map.containsKey(keys[i]));
			assertTrue(map.get(keys[i])==values[i]);
			assertEquals(i+1, map.size());
			//assertTrue(map.containsValue(values[i])); //TOO SLOW
		}
		
		
		
		for(int i=0;i<itemCount;i++){
			Object o=map.remove(keys[i]);
			assertFalse(map.containsKey(keys[i]));
			assertTrue(o==values[i]);
		}
		assertTrue(map.isEmpty());
		
		//now for random action.
		for(int i=0;i<itemCount;i++){
			Integer k=Integer.valueOf(random.nextInt());
			Object v=Integer.valueOf(random.nextInt());
			map.put(k,values[i]);
			assertTrue(map.containsKey(k));
			Object o=map.put(k,v);
			assertTrue(o==values[i]);
			assertTrue(map.get(k)==v);
			assertEquals(i+1, map.size());
		}
		
		map.clear();
		assertTrue(map.isEmpty());
		
		for(int i=0;i<itemCount;i++){
			map.put(keys[i], values[i]);
		}
		
		int count=0;
		for(Map.Entry<Integer,Object> e:map.entrySet()){
			assertTrue(map.get(e.getKey())==e.getValue());
			count++;
		}
		assertEquals(count, map.size());
		
		Collection<Object> v=map.values();
		assertEquals(count,v.size());
		Iterator<Object> iterator=v.iterator();
		for(int i=0;i<Math.min(1000, itemCount);i++){
			Object o=iterator.next();
			assertTrue(map.containsValue(o));
		}
		
		assertTrue(map.values().containsAll(Arrays.asList(values)));
		
		for(Object k:map.keySet()){
			assertTrue(map.containsKey(k));
			map.remove(k);
			assertFalse(map.containsKey(k));
		}
		assertTrue(map.isEmpty());
		
		map.clear();
		
		//put all.
		HashMap<Integer,Object> map2=new HashMap<Integer, Object>();
		for(int i=0;i<itemCount;i++){
			map2.put(keys[i], values[i]);
		}
		
		map.putAll(map2);
		assertEquals(map2.size(),map.size());
		assertTrue(map.keySet().containsAll(map2.keySet()));
	}