ObjectMapper { public long size() { long size = 0; for (List<EntryMap> hashCodeList : map.values()) { size += hashCodeList.size(); } return size; } ObjectMapper();   ObjectMapper(boolean useNativeHashcode); T get(Object obj, S key); void put(Object obj, S key, T val); boolean contains(Object obj, S key); void cleanup(); long size();  }
@Test public void testSize() { assertEquals(0, mapper.size()); mapper.put(dummy1, "test1", dummy1); mapper.put(dummy1, "test2", dummy1); mapper.put(dummy2, "test2", dummy1); assertEquals(2, mapper.size()); }