private void checkDuplicates(List<MessageInfo> infos) throws IllegalArgumentException {
    List<StoreKey> keys = infos.stream().map(MessageInfo::getStoreKey).collect(Collectors.toList());
    checkStoreKeyDuplicates(keys);
  }
Detects duplicates in {@code writeSet}
@param infos the list of {@link MessageInfo} to detect duplicates in
@throws IllegalArgumentException if a duplicate is detected
ambry-cloud/src/main/java/com/github/ambry/cloud/CloudBlobStore.java