public boolean isFatal(Throwable err, Consumer<Exception> throwableConsumer) {
        if (validator.test(err)) {
            throwableConsumer.accept(throwableMapper.apply(err));
            return false;
        }

        if (chainedClassifier != null) {
            return chainedClassifier.isFatal(err, throwableConsumer);
        } else {
            return true;
        }
    }
@Test
    public void exceptionsAreWrappedInTheContainingExceptionWhenAMatchIsFound() {
        AtomicReference<Exception> caughtExceptionReference = new AtomicReference<>();

        ARITHMETIC_EXCEPTION_STRATEGY.isFatal(
                new ArithmeticException("Base arithmetic exception"),
                caughtExceptionReference::set);

        assertThatCaughtExceptionIsWrappedArithmeticDivByZeroException(
                caughtExceptionReference.get());
    }