@Test
    public void testMultiWorkerRestartOnlyConnector() throws Exception {
        //run two additional workers to ensure that one worker will always be free and not running any tasks or connector instance for this connector
        //we will call restart on that worker and that will test the distributed behavior of the restart API
        int numWorkers = NUM_TASKS + 2;
        runningConnectorAndTasksRestart(false, false, 1, allTasksExpectedRestarts(0), false, numWorkers);
    }
Test connectors restart API use cases.
connect/runtime/src/test/java/org/apache/kafka/connect/integration/ConnectorRestartApiIntegrationTest.java