List<Symbol> arguments = Arrays.<Symbol>asList(
Literal.newLiteral("foobarbequebaz bar"),
Literal.newLiteral("(ba)"),
Literal.newLiteral("Crate")
);
Function function = createFunction(ReplaceFunction.NAME, DataTypes.STRING, arguments);
ReplaceFunction regexpImpl = (ReplaceFunction) functions.get(function.info().ident());
Symbol result = regexpImpl.normalizeSymbol(function);
assertLiteralSymbol(result, expected.utf8ToString());
arguments = Arrays.<Symbol>asList(
createReference("text", DataTypes.STRING),
Literal.newLiteral("(ba)"),
Literal.newLiteral("Crate")
);
function = createFunction(ReplaceFunction.NAME, DataTypes.STRING, arguments);
regexpImpl = (ReplaceFunction) functions.get(function.info().ident());
result = regexpImpl.normalizeSymbol(function);
assertThat(result, instanceOf(Function.class));
assertThat((Function)result, is(function));
}