public CasesBuilder<I, O> withSimpleEqualityAssertion() {
            final Consumer<TestOutcome<I, O>> wrappedConsumer = wrapTestOutcomeConsumer(testOutcome -> {
                final O expectedOutput = testOutcome.getExpectedOutput();
                final O actualOutput = testOutcome.getActualOutput();
                if (expectedOutput instanceof Set<?>
                    && actualOutput instanceof Collection<?>) {
                    Assertions.assertThat((Collection<O>) actualOutput)
                            .containsExactlyInAnyOrderElementsOf((Set<O>) expectedOutput);
                } else if (expectedOutput instanceof List<?>
                           && actualOutput instanceof Collection<?>) {
                    Assertions.assertThat((Collection<O>) actualOutput)
                            .containsExactlyElementsOf((List<O>) expectedOutput);
                } else if (expectedOutput instanceof Collection<?>
                           && actualOutput instanceof Collection<?>) {
                    // Using contains will give a better error message
                    Assertions.assertThat((Collection<O>) actualOutput)
                            .containsExactlyElementsOf((Collection<O>) expectedOutput);
                } else {
                    Assertions.assertThat(actualOutput)
                            .withFailMessage(testOutcome::buildFailMessage)
                            .isEqualTo(expectedOutput);
                }
            });
            return new CasesBuilder<>(testAction, wrappedConsumer);
        }
A pre-canned simple test action that just asserts that the actual output is equal to
the expected output.
If the {@link TestCase} includes an expected {@link Throwable} type then any exceptions will
be intercepted and asserted automatically. The consumer will not be called if an exception is
expected.
stroom-test-common/src/main/java/stroom/test/common/DynamicTestBuilder.java