@Test public void testSmash() { RuntimeException actual_1 = ExceptionUtil.smash(new WrongMethodTypeException()); RuntimeException actual_2 = ExceptionUtil.smash(new ClassNotFoundException()); RuntimeException actual_3 = ExceptionUtil.smash(new NoSuchElementException()); RuntimeException actual_4 = ExceptionUtil.smash(new NoSuchFieldException()); assertNotNull(actual_1); assertEquals("class java.lang.invoke.WrongMethodTypeException", actual_1.getClass().toString()); assertNotNull(actual_2); assertEquals("class java.lang.RuntimeException", actual_2.getClass().toString()); assertNotNull(actual_3); assertEquals("class java.util.NoSuchElementException", actual_3.getClass().toString()); assertNotNull(actual_4); assertEquals("class java.lang.RuntimeException", actual_4.getClass().toString()); }
public static RuntimeException smash(Throwable t) { if (t instanceof RuntimeException) return (RuntimeException) t; return new RuntimeException(t); }
ExceptionUtil { public static RuntimeException smash(Throwable t) { if (t instanceof RuntimeException) return (RuntimeException) t; return new RuntimeException(t); } }
ExceptionUtil { public static RuntimeException smash(Throwable t) { if (t instanceof RuntimeException) return (RuntimeException) t; return new RuntimeException(t); }  }
ExceptionUtil { public static RuntimeException smash(Throwable t) { if (t instanceof RuntimeException) return (RuntimeException) t; return new RuntimeException(t); }  static Throwable rootOf(Throwable t); static String rootStackTrace(Throwable t); static RuntimeException smash(Throwable t); }
ExceptionUtil { public static RuntimeException smash(Throwable t) { if (t instanceof RuntimeException) return (RuntimeException) t; return new RuntimeException(t); }  static Throwable rootOf(Throwable t); static String rootStackTrace(Throwable t); static RuntimeException smash(Throwable t);  }