* {@link edu.luc.cs.laufer.cs473.index.DefaultIndexImpl#add(java.lang.String, int)}.
*/
@Test
public void testMultipleInstances() throws Exception {
index.clear();
Index index2 = index.getClass().newInstance();
index.add("abc", 1);
index.add("abc", 2);
index.add("xyz", 3);
index.add("xyz", 4);
index2.add("uvw", 1);
index2.add("uvw", 2);
assertEquals(2, index.size());
assertEquals(1, index2.size());
assertTrue(index.containsKey("abc"));
assertTrue(index.containsKey("xyz"));
assertTrue(index2.containsKey("uvw"));
assertFalse(index2.containsKey("abc"));
assertFalse(index2.containsKey("xyz"));
assertFalse(index.containsKey("uvw"));
}