public static <R> R runSafely(
      Block<R, RuntimeException, RuntimeException, RuntimeException> block,
      CatchBlock catchBlock,
      FinallyBlock finallyBlock) {
    return runSafely(
        block,
        catchBlock,
        finallyBlock,
        RuntimeException.class,
        RuntimeException.class,
        RuntimeException.class);
  }
@Test
  public void testRunSafelyRuntimeExceptions() {
    RuntimeException exc = new RuntimeException("test");
    Exception suppressedOne = new Exception("test catch suppression");
    CustomCheckedException suppressedTwo = new CustomCheckedException("test finally suppression");
    assertThatThrownBy(
            () ->
                ExceptionUtil.runSafely(
                    () -> {
                      throw exc;
                    },
                    e -> {
                      throw suppressedOne;
                    },
                    () -> {
                      throw suppressedTwo;
                    }))
        .isInstanceOf(RuntimeException.class)
        .isEqualTo(exc)
        .extracting(e -> Arrays.asList(e.getSuppressed()))
        .asList()
        .hasSize(2)
        .containsExactly(suppressedOne, suppressedTwo);
  }