protected static Optional<String> getAsDateTimeValue(final Sequence sequence) {
        return Optional.ofNullable(sequence)
                .map(sequence2 -> {
                    if (sequence2 instanceof EmptyAtomicSequence) {
                        return null;
                    } else if (sequence2 instanceof DateTimeValue) {
                        String str = ((DateTimeValue) sequence2).getStringValue();
                        LOGGER.debug("Got dateTime value:\n{}", str);
                        return str;
                    } else {
                        return sequence.toString();
                    }
                });
    }
Assert the number of times {@link ErrorReceiver#log(Severity, Location, String, String, Throwable)}
is called and get all the call args.

@param callCount Expected number of calls
@return All args used in the calls
stroom-pipeline/src/test/java/stroom/pipeline/xsltfunctions/AbstractXsltFunctionTest.java