@Test
    public void testMultiWorkerRestartBothConnectorAndTasks() throws Exception {
        //run 2 additional workers to ensure 1 worker will be free that is not running any tasks or connector instance for this connector
        int numWorkers = NUM_TASKS + 2;
        runningConnectorAndTasksRestart(false, true, 1, allTasksExpectedRestarts(1), false, numWorkers);
    }
Test connectors restart API use cases.
connect/runtime/src/test/java/org/apache/kafka/connect/integration/ConnectorRestartApiIntegrationTest.java