RepositoryMap { boolean contains(Descriptor descriptor, Object original) { assert descriptor != null; assert original != null; final Map<Object, Object> entities = getMap(descriptor); return entities.containsKey(original); }    }
@Test public void testContains() { repoMap.add(descriptor, entityA, cloneA); repoMap.add(descriptor, entityB, cloneB); assertTrue(repoMap.contains(descriptor, entityA)); assertTrue(repoMap.contains(descriptor, entityB)); assertFalse(repoMap.contains(descriptor, entityE)); final EntityDescriptor desc = new EntityDescriptor(); assertFalse(repoMap.contains(desc, entityA)); }