private static void assertAllOperators(Collection<OperatorSpec> originalOpSpecs, Collection<OperatorSpec> clonedOpSpecs) {
    assertEquals(originalOpSpecs.size(), clonedOpSpecs.size());
    List<OperatorSpec> originalList = new ArrayList<>(originalOpSpecs);
    List<OperatorSpec> clonedList = new ArrayList<>(clonedOpSpecs);
    Collections.sort(originalList, Comparator.comparing(OperatorSpec::getOpId));
    Collections.sort(clonedList, Comparator.comparing(OperatorSpec::getOpId));
    Iterator<OperatorSpec> oIter = originalList.iterator();
    Iterator<OperatorSpec> nIter = clonedList.iterator();
    oIter.forEachRemaining(opSpec -> assertClonedOpSpec(opSpec, nIter.next()));
  }
Test util methods for {@link OperatorSpec} classes
samza-core/src/test/java/org/apache/samza/operators/spec/OperatorSpecTestUtils.java