public static void addMapPopulationExpressions(Map<String, Expression> toAdd, BlockStmt body, String mapName) {
        toAdd.forEach((key, value) -> {
            NodeList<Expression> expressions = NodeList.nodeList(new StringLiteralExpr(key), value);
            body.addStatement(new MethodCallExpr(new NameExpr(mapName), "put", expressions));
        });
    }
@Test
    void addMapPopulationExpression() {
        Map<String, Expression> inputMap = new HashMap<>();
        inputMap.put("one", new StringLiteralExpr("ONE"));
        inputMap.put("two", new IntegerLiteralExpr("2"));
        inputMap.put("three", new DoubleLiteralExpr("3.0"));

        BlockStmt inputBody = new BlockStmt();

        String inputMapName = "testMap";

        CommonCodegenUtils.addMapPopulationExpressions(inputMap, inputBody, inputMapName);

        NodeList<Statement> statements = inputBody.getStatements();
        assertThat(statements).hasSize(inputMap.size());

        List<MethodCallExpr> methodCallExprs = new ArrayList<>(statements.size());

        for (Statement statement : statements) {
            assertThat(statement).isInstanceOf(ExpressionStmt.class);
            Expression expression = ((ExpressionStmt) statement).getExpression();
            assertThat(expression).isInstanceOf(MethodCallExpr.class);
            MethodCallExpr methodCallExpr = (MethodCallExpr) expression;
            assertThat(methodCallExpr.getScope().map(Node::toString).orElse(null)).isEqualTo(inputMapName);
            assertThat(methodCallExpr.getName().asString()).isEqualTo("put");
            assertThat(methodCallExpr.getArguments()).hasSize(2);
            assertThat(methodCallExpr.getArgument(0)).isInstanceOf(StringLiteralExpr.class);
            methodCallExprs.add(methodCallExpr);
        }

        for (Map.Entry<String, Expression> inputEntry : inputMap.entrySet()) {
            assertThat(
                    methodCallExprs.stream().filter(methodCallExpr -> {
                        StringLiteralExpr arg0 = (StringLiteralExpr) methodCallExpr.getArgument(0);
                        return arg0.asString().equals(inputEntry.getKey())
                                && methodCallExpr.getArgument(1).equals(inputEntry.getValue());
                    })).as("Expected one and only one statement for key \"" + inputEntry.getKey() + "\"").hasSize(1);
        }
    }