private void restartUnknownConnector(boolean onlyFailed, boolean includeTasks) throws Exception {
        String connectorName = "Unknown";

        // build a Connect cluster backed by a Kafka KRaft cluster
        startOrReuseConnectWithNumWorkers(ONE_WORKER);
        // Call the Restart API
        String restartEndpoint = connect.endpointForResource(
                String.format("connectors/%s/restart?onlyFailed=" + onlyFailed + "&includeTasks=" + includeTasks, connectorName));
        Response response = connect.requestPost(restartEndpoint, "", Collections.emptyMap());
        assertEquals(Response.Status.NOT_FOUND.getStatusCode(), response.getStatus());
    }
Test connectors restart API use cases.
connect/runtime/src/test/java/org/apache/kafka/connect/integration/ConnectorRestartApiIntegrationTest.java