docs: public <T> T invoke(Runnable r, T result) throws Exception {
          try {
              r.run();
              succeed();
              return result;
          } catch (Exception e) {
              fail();
              throw e;
          }
      }