public StartAndStopLatch expectedStops(int expectedStops, List<StartAndStopLatch> dependents) {
        return expectedRestarts(0, expectedStops, dependents);
    }
Obtain a {@link StartAndStopLatch} that can be used to wait until the expected number of
stops has been completed.

@param expectedStops the expected number of stops
@param dependents    any dependent latches that must also complete in order for the
                     resulting latch to complete
@return the latch; never null
connect/runtime/src/test/java/org/apache/kafka/connect/integration/StartAndStopCounter.java