@Override
    public RuntimeException handleFault(String failureMessage, Throwable cause) {
        if (cause == null) {
            log.error("Encountered {} fault: {}", type, failureMessage);
        } else {
            log.error("Encountered {} fault: {}", type, failureMessage, cause);
        }
        try {
            action.run();
        } catch (Throwable e) {
            log.error("Failed to run LoggingFaultHandler action.", e);
        }
        return new FaultHandlerException(failureMessage, cause);
    }
@Test
    public void testHandleFault() {
        AtomicInteger counter = new AtomicInteger(0);
        LoggingFaultHandler handler = new LoggingFaultHandler("test", () -> {
            counter.incrementAndGet();
        });
        handler.handleFault("uh oh");
        assertEquals(1, counter.get());
        handler.handleFault("uh oh", new RuntimeException("yikes"));
        assertEquals(2, counter.get());
    }