private void examineFunctionClass(final Class<? extends Function> functionClass) {
        SoftAssertions.assertSoftly(softAssertions -> {
            final Optional<FunctionDef> optFuncDef = FunctionFactory.getFunctionDefinition(functionClass);
            final String className = functionClass.getSimpleName();

            if (Modifier.isAbstract(functionClass.getModifiers())) {
                softAssertions.assertThat(optFuncDef)
                        .withFailMessage("Function class " +
                                className +
                                " should not have @FunctionDef as it is abstract")
                        .isEmpty();
            } else {
                softAssertions.assertThat(optFuncDef)
                        .withFailMessage("Function class " +
                                className +
                                " is not in FunctionFactory. " +
                                "Add an @FunctionDef annotation to it or mark is as @ArchitecturalFunction")
                        .isNotEmpty();

                optFuncDef.ifPresent(functionDef -> {
                    doSoftAssertions(softAssertions, functionDef, className);
                });
            }
            if (!softAssertions.wasSuccess()) {
                LOGGER.error("Found {} errors", softAssertions.errorsCollected().size());
            }
        });
    }
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