Assert.assertEquals(subtract.getArg2().getVarName(), "a");
}
@Test
public void test_function_expansion_13() {
Expr square = new E_Multiply(new ExprVar("x"), new ExprVar("x"));
UserDefinedFunctionFactory.getFactory().add("http://example/square", square, new ArrayList<Var>(square.getVarsMentioned()));
//This test illustrates that if we change the definition of square and call our function again we always
//get the same result with dependencies not preserved because even though the definition of the dependent function
//can change the definition of our function is fully expanded when first defined
Expr cube = new E_Multiply(new E_Function("http://example/square", new ExprList(new ExprVar("x"))), new ExprVar("x"));
UserDefinedFunctionFactory.getFactory().add("http://example/cube", cube, new ArrayList<Var>(cube.getVarsMentioned()));
UserDefinedFunction f = (UserDefinedFunction) UserDefinedFunctionFactory.getFactory().create("http://example/cube");
f.build("http://example/cube", new ExprList(new NodeValueInteger(2)));
Expr actual = f.getActualExpr();