code: @ObjectiveCName("then:")
      public synchronized Promise<T> then(final Consumer<T> then) {
          if (isFinished) {
              if (exception == null) {
                  dispatcher.dispatch(() -> then.apply(result));
              }
          } else {
              callbacks.add(new PromiseCallback<T>() {
                  @Override
                  public void onResult(T t) {
                      then.apply(t);
                  }
  
                  @Override
                  public void onError(Exception e) {
                      // Do nothing
                  }
              });
          }
          return this;
      }
docs: Handling successful result
  
  @param then supplier for result
  @return this