RepositoryMap { Object get(Descriptor descriptor, Object original) { assert descriptor != null; assert original != null; final Map<Object, Object> entities = getMap(descriptor); if (!entities.containsKey(original)) { return null; } return entities.get(original); }    }
@Test public void testGet() { repoMap.add(descriptor, entityA, cloneA); repoMap.add(descriptor, entityB, cloneB); final Object res = repoMap.get(descriptor, entityA); assertNotNull(res); assertSame(cloneA, res); }
@Test public void testGetUnknown() { final Object res = repoMap.get(descriptor, entityA); assertNull(res); }