public static <T> Supplier<T> recover(Supplier<T> supplier,
        Predicate<T> resultPredicate, UnaryOperator<T> resultHandler) {
        return () -> {
            T result = supplier.get();
            if(resultPredicate.test(result)){
                return resultHandler.apply(result);
            }
            return result;
        };
    }
@Test
    public void shouldRecoverSupplierFromException() {
        Supplier<String> supplier = () -> {
            throw new RuntimeException("BAM!");
        };
        Supplier<String> supplierWithRecovery = SupplierUtils.recover(supplier, (ex) -> "Bla");

        String result = supplierWithRecovery.get();

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