public static <T> CheckedFunction0<T> recover(CheckedFunction0<T> function,
        CheckedFunction1<Throwable, T> exceptionHandler) {
        return () -> {
            try {
                return function.apply();
            } catch (Throwable throwable) {
                return exceptionHandler.apply(throwable);
            }
        };
    }
@Test
    public void shouldRecoverFromException() throws Throwable {
        CheckedFunction0<String> callable = () -> {
            throw new IOException("BAM!");
        };
        CheckedFunction0<String> callableWithRecovery = VavrCheckedFunctionUtils.recover(callable, (ex) -> "Bla");

        String result = callableWithRecovery.apply();

        assertThat(result).isEqualTo("Bla");
    }