@Test
  public void testBasicOperationWithDuplicate() throws Exception {
    StoreKey storeKey0 = mock(StoreKey.class);
    StoreKey storeKey1 = mock(StoreKey.class);
    StoreKey storeKey2 = storeKey0;
    assertNotSame("storeKeys should not be equal", storeKey0, storeKey1);
    assertSame("storeKey0 and storeKey2 should be equal", storeKey0, storeKey2);
    List<StoreKey> list = Arrays.asList(storeKey0, storeKey1, storeKey2);
    Map<StoreKey, StoreKey> storeKeyMap = storeKeyConverter.convert(list);
    assertEquals("Returned mapping does not have size 2", 2, storeKeyMap.size());
    assertTrue("storeKey0 not in mapping", storeKeyMap.containsKey(storeKey0));
    assertTrue("storeKey1 not in mapping", storeKeyMap.containsKey(storeKey1));
    storeKeyMap.forEach(
        (key, value) -> assertEquals("Returned StoreKey keys should be the same as their values", key, value));
    assertEquals("storeKey0 not equal", storeKey0, storeKeyConverter.getConverted(storeKey0));
    assertEquals("storeKey1 not equal", storeKey1, storeKeyConverter.getConverted(storeKey1));
  }
Tests conversion of a StoreKey collection with two unique StoreKeys and a duplicate of one of them
@throws Exception
ambry-commons/src/test/java/com/github/ambry/store/StoreKeyConverterImplNoOpTest.java