private void checkLastRequestPartitionClasses(int expectedCount, String expectedClass,
      boolean isStitchedOrChunkedUpload) {
    List<String> lastNRequestedPartitionClasses = mockClusterMap.getLastNRequestedPartitionClasses();
    if (expectedCount >= 0) {
      if (!isStitchedOrChunkedUpload) {
        expectedCount++; // to account for Metadata chunk's reserved partition id.
      }
      assertEquals("Last requested partition class count is not as expected", expectedCount,
          lastNRequestedPartitionClasses.size());
    }
    List<String> partitionClassesExpected = Collections.nCopies(lastNRequestedPartitionClasses.size(), expectedClass);
    assertEquals("Last requested partition classes not as expected", partitionClassesExpected,
        lastNRequestedPartitionClasses);
  }
Checks the last {@code expectedCount} partition classes requested from the clustermap to make sure they match with
{@code expectedClass}
@param expectedCount the number of times the {@code expectedClass} was requested. If < 0, the check is ignored
@param expectedClass the partition class requested
ambry-router/src/test/java/com/github/ambry/router/PutManagerTest.java