GuardedRunnable { public static Runnable guard(Runnable delegate) { return () -> runGuarded(delegate); } private  GuardedRunnable(); static Runnable guard(Runnable delegate); static void runGuarded(Runnable delegate);  }
@Test public void shouldRun() { doNothing().when(runnable).run(); GuardedRunnable.guard(runnable).run(); verify(runnable).run(); }
@Test public void shouldNotThrow() { doThrow(new RuntimeException()).when(runnable).run(); GuardedRunnable.guard(runnable).run(); }