UserDefinedFunctionFactory.getFactory().add("http://example/takeaway", takeaway, args);
//Test that with preserveDependencies set to false (the default) that the definition is expanded appropriately
ExprList numArgs = new ExprList();
numArgs.add(new NodeValueInteger(1));
numArgs.add(new NodeValueDouble(2.3));
Expr test = new E_Function("http://example/takeaway", numArgs);
UserDefinedFunctionFactory.getFactory().add("http://example/test", test, new ArrayList<Var>());
UserDefinedFunctionDefinition def = UserDefinedFunctionFactory.getFactory().get("http://example/test");
Expr base = def.getBaseExpr();