static Sequence[] buildFunctionArguments(final List<Object> args) {
        if (NullSafe.hasItems(args)) {
            Sequence[] seqArr = new Sequence[args.size()];
            for (int i = 0; i < args.size(); i++) {
                final Object val = args.get(i);
                final Item item;

                if (val == null) {
                    item = null;
                } else if (val instanceof Boolean) {
                    item = BooleanValue.get((Boolean) val);
                } else if (val instanceof Instant) {
                    item = convertInstantArg((Instant) val);
                } else if (val instanceof DateTimeValue) {
                    item = (DateTimeValue) val;
                } else {
                    item = StringValue.makeStringValue(val.toString());
                }
                seqArr[i] = item;
            }
            return seqArr;
        } else {
            return new Sequence[0];
        }
    }
Converts a list of objects into an array of {@link Sequence}

@param args
@return
stroom-pipeline/src/test/java/stroom/pipeline/xsltfunctions/AbstractXsltFunctionTest.java