public void assertConnectorIsRunningAndTasksHaveFailed(String connectorName, int numTasks, String detailMessage)
            throws InterruptedException {
        waitForConnectorState(
                connectorName,
                AbstractStatus.State.RUNNING,
                exactly(numTasks),
                null,
                AbstractStatus.State.FAILED,
                "Either the connector is not running or not all the " + numTasks + " tasks have failed.",
                detailMessage,
                CONNECTOR_SETUP_DURATION_MS
        );
    }
Assert that a connector is running, that it has a specific number of tasks, and that all of
its tasks are in the FAILED state.

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