private void assertOptionalArgs(final SoftAssertions softAssertions,
                                    final String classAndSigName,
                                    final FunctionArg[] args) {

        boolean foundOptArg = false;

        for (int i = 0; i < args.length; i++) {
            if (args[i].isOptional()) {
                if (foundOptArg && !args[i].isOptional()) {
                    softAssertions.fail(classAndSigName +
                            " - found mandatory argument " + args[i].name() +
                            " at index " + i + " after optional arguments. All arguments after an optional one" +
                            " must also be optional");
                }
                foundOptArg = true;
            }
        }
    }
This ia more of a QA to ensure all the annotations are set correctly for the functions
stroom-query/stroom-query-language/src/test/java/stroom/query/language/functions/TestFunctionFactory.java