protected void logLogCallsToDebug() {
        Mockito.doAnswer(invocation -> {
            final Severity severity = invocation.getArgument(0);
            final String message = invocation.getArgument(3);
            final Throwable throwable = invocation.getArgument(4);

            final String box = LogUtil.inBox("{}: {}{}",
                    severity,
                    message,
                    NullSafe.getOrElse(
                            throwable,
                            t -> " - ("
                                 + t.getClass().getSimpleName()
                                 + ": "
                                 + t.getMessage()
                                 + ")",
                            ""));

            LOGGER.debug("Call to mock ErrorReceiver.log():\n{}", box);

            return null;
        }).when(getMockErrorReceiver()).log(
                Mockito.any(),
                Mockito.any(),
                Mockito.any(),
                Mockito.any(),
                Mockito.any());
    }
Log any calls to the {@link ErrorReceiver} to DEBUG.
Only call this method if you expect at least one call, else you will need to
set {@link Mockito} strictness to lenient.
stroom-pipeline/src/test/java/stroom/pipeline/xsltfunctions/AbstractXsltFunctionTest.java