@Test
public void flattenMethodCall() {

    List<Node> actual = flattenScope(MockTypeResolver.INSTANCE, expr("name.startsWith(\"M\")"));
    MethodCallExpr methodCallExpr = new MethodCallExpr(new NameExpr("name"), "startsWith",
                                                       nodeList(new StringLiteralExpr("M")));
    methodCallExpr.setTypeArguments(NodeList.nodeList());
    List<Node> expected = asList(new NameExpr("name"), methodCallExpr);
    compareArrays(actual, expected);
}