Assert { public static <T> T unexpectedException(Throwable e) { unexpectedException(e, null, (Object[]) null); return null; }  static T assertNotNull(T object); static T assertNotNull(T object, String message, Object...args); static T assertNotNull(T object, ExceptionType exceptionType, String message, Object...args); static T assertNull(T object); static T assertNull(T object, String message, Object...args); static T assertNull(T object, ExceptionType exceptionType, String message, Object...args); static void assertTrue(boolean expression); static void assertTrue(boolean expression, String message, Object...args); static void assertTrue(boolean expression, ExceptionType exceptionType, String message, Object...args); static T unreachableCode(); static T unreachableCode(String message, Object...args); static T unexpectedException(Throwable e); static T unexpectedException(Throwable e, String message, Object...args); static T fail(); static T fail(String message, Object...args); static T unsupportedOperation(); static T unsupportedOperation(String message, Object...args);  }
@Test public void unexpectedException() { final Throwable e = new Throwable(); try { Assert.unexpectedException(e); } catch (UnexpectedFailureException ee) { assertThat(ee, exception(UnexpectedFailureException.class, DEFAULT_HEADER, "unexpected")); } try { Assert.unexpectedException(e, MESSAGE); } catch (UnexpectedFailureException ee) { assertThat(ee, exception(UnexpectedFailureException.class, MESSAGE)); } try { Assert.unexpectedException(e, MESSAGE, 1); } catch (UnexpectedFailureException ee) { assertThat(ee, exception(UnexpectedFailureException.class, MESSAGE_1)); } try { Assert.unexpectedException(e); fail(); } catch (UnexpectedFailureException ee) { assertSame(e, ee.getCause()); } try { Assert.unexpectedException(e, MESSAGE); fail(); } catch (UnexpectedFailureException ee) { assertSame(e, ee.getCause()); } }