protected static String buildRequestBody(String query, String operationName, JsonObject variables) {
        JsonObject jsonObject = new JsonObject();
        jsonObject.put("query", query);
        jsonObject.put("operationName", operationName);
        jsonObject.put("variables", variables != null ? variables : new JsonObject());
        return jsonObject.toJson();
    }
@Test
    public void shouldBuildRequestBodyWithQueryOperationNameAndVariables() {
        String query = "queryText";
        String operationName = "queryName";
        JsonObject variables = new JsonObject();
        variables.put("key1", "value1");
        variables.put("key2", "value2");

        String body = GraphqlProducer.buildRequestBody(query, operationName, variables);

        String expectedBody = "{"
                              + "\"query\":\"queryText\","
                              + "\"operationName\":\"queryName\","
                              + "\"variables\":{\"key1\":\"value1\",\"key2\":\"value2\"}"
                              + "}";
        assertEquals(expectedBody, body);
    }