public static TestCase ofAggregate(final String testVariantName,
                                           final Val expectedReturn,
                                           final List<Val> values,
                                           final Param... extraParams) {

//            FieldIndex fieldIndex = FieldIndex.forFields("field1");
            Ref ref = new Ref("field1", 0);
            List<Param> params = Stream.concat(Stream.of(ref), Arrays.stream(extraParams))
                    .collect(Collectors.toList());

            return new TestCase(
                    testVariantName,
                    expectedReturn,
                    params,
                    values);
        }
Variant for where the return value is a ValString
stroom-query/stroom-query-language/src/test/java/stroom/query/language/functions/AbstractFunctionTest.java