public StartAndStopLatch expectedRestarts(int expectedStarts, int expectedStops) {
        return expectedRestarts(expectedStarts, expectedStops, null);
    }
Obtain a {@link StartAndStopLatch} that can be used to wait until the expected number of restarts
has been completed.

@param expectedStarts   the expected number of starts; may be 0
@param expectedStops    the expected number of stops; may be 0
@return the latch; never null
connect/runtime/src/test/java/org/apache/kafka/connect/integration/StartAndStopCounter.java