### Question:
CbThrowables { public static void throwIfUnchecked(Throwable t) { requireNonNull(t); if (t instanceof RuntimeException) { throw (RuntimeException) t; } if (t instanceof Error) { throw (Error) t; } } private  CbThrowables(); static Optional<T> findCause(Throwable t, final Class<T> type); static boolean hasCause(Throwable t, final Class<? extends Throwable> type); static void throwIfUnchecked(Throwable t); static void throwIfInstanceOf(Throwable t, Class<T> clazz);  }### Answer:
@Test void throwIfUncheckedWorks() { CbThrowables.throwIfUnchecked(new Exception("oops, should not have throw this")); assertThrows(IndexOutOfBoundsException.class, () -> CbThrowables.throwIfUnchecked(new IndexOutOfBoundsException())); }