public boolean isAssigned() {
            return assigned;
        }
Obtain a {@link StartAndStopLatch} that can be used to wait until this task has completed the
expected number of starts.

@param expectedStops    the expected number of stops
@return the latch; never null
connect/runtime/src/test/java/org/apache/kafka/connect/integration/TaskHandle.java