private void assertNoRestartingState(ConnectorStateInfo connectorStateInfo) {
        //for noop requests as everything is in RUNNING state, assert that plan was empty which means
        // no RESTARTING state for the connector or tasks
        assertNotEquals(AbstractStatus.State.RESTARTING.name(), connectorStateInfo.connector().state());
        connectorStateInfo.tasks().forEach(t -> assertNotEquals(AbstractStatus.State.RESTARTING.name(), t.state()));
    }
Test connectors restart API use cases.
connect/runtime/src/test/java/org/apache/kafka/connect/integration/ConnectorRestartApiIntegrationTest.java