### Question:
Exceptions { public static <T> T rethrow(Throwable e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } else if (e instanceof Error) { throw (Error) e; } else { throw new UncheckedException(e); } } private  Exceptions(); static T rethrow(Throwable e); static T rethrow(Callable<? extends Throwable> callable);  }### Answer:
@Test(expected = OutOfMemoryError.class) public void testRethrowError() { Exceptions.rethrow(new OutOfMemoryError()); }
@Test(expected = TestRuntimeException.class) public void testCallableRethrows() { Exceptions.rethrow(() -> new TestRuntimeException()); }
@Test(expected = UncheckedException.class) public void testCallableRethrowsChecked() { Exceptions.rethrow(() -> new TestException()); }