@Test
@SuppressWarnings("unchecked")
public void testNormalizeSymbol() throws Exception {
FunctionImplementation castIntegerToString = functions.get(new FunctionIdent(ToStringFunction.NAME, ImmutableList.<DataType>of(DataTypes.INTEGER)));
Function function = new Function(castIntegerToString.info(), Arrays.<Symbol>asList(Literal.newLiteral(123)));
Symbol result = castIntegerToString.normalizeSymbol(function);
assertLiteralSymbol(result, "123");
FunctionImplementation castFloatToString = functions.get(new FunctionIdent(ToStringFunction.NAME, ImmutableList.<DataType>of(DataTypes.FLOAT)));
function = new Function(castFloatToString.info(), Arrays.<Symbol>asList(Literal.newLiteral(0.5f)));
result = castFloatToString.normalizeSymbol(function);
assertLiteralSymbol(result, "0.5");
FunctionImplementation castStringToString = functions.get(new FunctionIdent(ToStringFunction.NAME, ImmutableList.<DataType>of(DataTypes.STRING)));
function = new Function(castStringToString.info(), Arrays.<Symbol>asList(Literal.newLiteral("hello")));
result = castStringToString.normalizeSymbol(function);
assertLiteralSymbol(result, "hello");
}