Mute { private Mute() {} private  Mute(); static void mute(CheckedRunnable runnable); static void loggedMute(CheckedRunnable runnable);  }
@Test public void muteShouldRunTheCheckedRunnableAndNotThrowAnyExceptionIfCheckedRunnableDoesNotThrowAnyException() { Mute.mute(() -> methodNotThrowingAnyException()); }
@Test public void muteShouldRethrowUnexpectedExceptionAsAssertionError() throws Exception { exception.expect(AssertionError.class); exception.expectMessage(MESSAGE); Mute.mute(() -> methodThrowingException()); }