SqlStreamInput/Output use TransportVersion from a read-in Version constant. We need to remove the useage of `transportVersion` field
x-pack/plugin/sql/qa/mixed-node/src/javaRestTest/java/org/elasticsearch/xpack/sql/qa/mixed_node/SqlCompatIT.java
json.field(entry.getKey(), entry.getValue());
        }
        json.endObject();
        return Strings.toString(json);
    }
    public void testCursorFromOldNodeFailsOnNewNode() throws IOException {
        assertCursorNotCompatibleAcrossVersions(bwcVersion, oldNodesClient, Version.CURRENT, newNodesClient);
    }
    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/83726")
    public void testCursorFromNewNodeFailsOnOldNode() throws IOException {
        assertCursorNotCompatibleAcrossVersions(Version.CURRENT, newNodesClient, bwcVersion, oldNodesClient);
    }
    private void assertCursorNotCompatibleAcrossVersions(Version version1, RestClient client1, Version version2, RestClient client2)
        throws IOException {
        indexDocs();
        Request req = new Request("POST", "_sql");
        req.setJsonEntity(sqlQueryEntityWithOptionalMode(Map.of("query", "SELECT int FROM test", "fetch_size", 1), bwcVersion));
        Map<String, Object> json = performRequestAndReadBodyAsJson(client1, req);
        String cursor = (String) json.get("cursor");
        assertThat(cursor, Matchers.not(Matchers.emptyOrNullString()));
        Request scrollReq = new Request("POST", "_sql");
        scrollReq.setJsonEntity(Strings.format("{\"cursor\": \"%s\"}", cursor));
        ResponseException exception = expectThrows(ResponseException.class, () -> client2.performRequest(scrollReq));
        assertThat(
            exception.getMessage(),
            Matchers.containsString("Unsupported cursor version [" + version1 + "], expected [" + version2 + "]")
        );
    }
    private Map<String, Object> performRequestAndReadBodyAsJson(RestClient client, Request request) throws IOException {
        Response response = client.performRequest(request);