### Question:
Unchecked { public static void wrap(CheckedRunnable block) { try { block.run(); } catch (Throwable ex) { throw propagate(ex); } } private  Unchecked(); static void wrap(CheckedRunnable block); static T wrap(CheckedSupplier<T> block); static Runnable runnable(CheckedRunnable runnable); static Function<T, R> function(CheckedFunction<T, R> function); static BiFunction<T, U, R> biFunction(CheckedBiFunction<T, U, R> function); static UnaryOperator<T> unaryOperator(CheckedUnaryOperator<T> function); static BinaryOperator<T> binaryOperator(CheckedBinaryOperator<T> function); static Predicate<T> predicate(CheckedPredicate<T> predicate); static BiPredicate<T, U> biPredicate(CheckedBiPredicate<T, U> predicate); static Consumer<T> consumer(CheckedConsumer<T> consumer); static BiConsumer<T, U> biConsumer(CheckedBiConsumer<T, U> consumer); static Supplier<R> supplier(CheckedSupplier<R> supplier); static RuntimeException propagate(Throwable throwable);  }### Answer:
@Test public void test_wrap_runnable1() { try { Unchecked.wrap((CheckedRunnable) () -> { throw new IOException(); }); fail("Expected UncheckedIOException"); } catch (UncheckedIOException ex) { } }
@Test public void test_wrap_runnable2() { try { Unchecked.wrap((CheckedRunnable) () -> { throw new Exception(); }); fail("Expected RuntimeException"); } catch (RuntimeException ex) { } }
@Test public void test_wrap_supplier() { try { Unchecked.wrap((CheckedSupplier<String>) () -> { throw new IOException(); }); fail("Expected UncheckedIOException"); } catch (UncheckedIOException ex) { } }
@Test public void test_wrap_supplier2() { try { Unchecked.wrap((CheckedSupplier<String>) () -> { throw new Exception(); }); fail("Expected RuntimeException"); } catch (RuntimeException ex) { } }