### Question:
Exceptions { public static RuntimeException propagate(Throwable throwable) { if (throwable instanceof InterruptedException) { throw new RuntimeInterruptedException((InterruptedException) throwable); } else if (throwable instanceof RuntimeInterruptedException) { Thread.currentThread().interrupt(); throw (RuntimeInterruptedException) throwable; } Throwables.propagateIfPossible(checkNotNull(throwable)); throw new PropagatedRuntimeException(throwable); }  static boolean isPrefixBoring(Throwable t); static RuntimeException propagate(Throwable throwable); static RuntimeException propagate(String msg, Throwable throwable); static void propagateIfFatal(Throwable throwable); @SuppressWarnings("unchecked") static T getFirstThrowableOfType(Throwable from, Class<T> clazz); static Throwable getFirstThrowableMatching(Throwable from, Predicate<? super Throwable> filter); static Throwable getFirstInteresting(Throwable throwable); static Throwable collapse(Throwable source); static Throwable collapseIncludingAllCausalMessages(Throwable source); static Throwable collapse(Throwable source, boolean collapseCausalChain); static RuntimeException propagateCollapsed(Throwable source); static String collapseText(Throwable t); static String collapseTextIncludingAllCausalMessages(Throwable t); static RuntimeException propagate(Collection<? extends Throwable> exceptions); static RuntimeException propagate(String prefix, Collection<? extends Throwable> exceptions); static Throwable create(Collection<? extends Throwable> exceptions); static RuntimeException create(@Nullable String prefix, Collection<? extends Throwable> exceptions); static boolean isPrefixImportant(Throwable t); static String getPrefixText(Throwable t);  }### Answer:
@Test public void testPropagateRuntimeException() throws Exception { NullPointerException tothrow = new NullPointerException("simulated"); try { throw Exceptions.propagate(tothrow); } catch (NullPointerException e) { assertEquals(e, tothrow); } }
@Test public void testPropagateCheckedException() throws Exception { Exception tothrow = new Exception("simulated"); try { throw Exceptions.propagate(tothrow); } catch (RuntimeException e) { assertEquals(e.getCause(), tothrow); } }
@Test public void testPropagateCheckedExceptionWithMessage() throws Exception { String extraMsg = "my message"; Exception tothrow = new Exception("simulated"); try { throw Exceptions.propagate(extraMsg, tothrow); } catch (RuntimeException e) { assertEquals(e.getMessage(), "my message"); assertEquals(e.getCause(), tothrow); } }
@Test public void testPropagateRuntimeExceptionIgnoresMessage() throws Exception { NullPointerException tothrow = new NullPointerException("simulated"); try { throw Exceptions.propagate("my message", tothrow); } catch (NullPointerException e) { assertEquals(e, tothrow); } }