@Test
    public void testProgrammaticBuilding() throws ParseException {
        ReferenceNode input = new ReferenceNode("input");
        ReferenceNode constant = new ReferenceNode("constant");
        OperationNode product = new OperationNode(input, Operator.multiply, constant);
        Reduce<Reference> sum = new Reduce<>(new TensorFunctionNode.ExpressionTensorFunction(product), Reduce.Aggregator.sum);
        RankingExpression expression = new RankingExpression(new TensorFunctionNode(sum));

        RankingExpression expected = new RankingExpression("sum(input * constant)");
        assertEquals(expected.toString(), expression.toString());
    }
@author Simon Thoresen Hult
@author bratseth
searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/RankingExpressionTestCase.java