private boolean collectionEquals(Collection<? extends PartitionId> collection1,
      Collection<? extends PartitionId> collection2) {
    return collection1.size() == collection2.size() && collection1.containsAll(collection2) && collection2.containsAll(
        collection1);
  }
Check if two collections have same contents.
@param collection1 {@link Collection} object to compare.
@param collection2 {@link Collection} object to compare.
@return true if contents are equals. false otherwise.
ambry-vcr/src/test/java/com/github/ambry/vcr/HelixVcrClusterParticipantTest.java