public void assertConnectorIsStopped(String connectorName, String detailMessage)
            throws InterruptedException {
        waitForConnectorState(
                connectorName,
                AbstractStatus.State.STOPPED,
                exactly(0),
                null,
                null,
                "At least the connector or one of its tasks is still running",
                detailMessage,
                CONNECTOR_SHUTDOWN_DURATION_MS
        );
    }
Assert that a connector is in the stopped state and has no tasks.

@param connectorName the connector name
@param detailMessage the assertion message
@throws InterruptedException
connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/ConnectAssertions.java