Assert.assertTrue("Parsed predicate should be a MethodInvoke, but is " + op.getClass().getCanonicalName(), op instanceof MethodInvocationOp);
MethodInvocationOp invoke = (MethodInvocationOp)op;
FreeVars vars = invoke.getFreeVariables();
Assert.assertEquals("Wrong number of free vars", 4, vars.size());
Assert.assertEquals("Wrong type", "Foo", vars.getType(Constraint.RECEIVER));
Assert.assertEquals("Wrong type", "Baz", vars.getType(Constraint.RESULT));
Assert.assertEquals("Wrong type", "Bar", vars.getType(new SpecVar("bar")));
Assert.assertEquals("Wrong type", "Baz", vars.getType(new SpecVar("baz")));
}