docs: public void addFinalStageInfoListener(StateChangeListener<StageInfo> finalStatusListener)
      {
          AtomicBoolean done = new AtomicBoolean();
          StateChangeListener<Optional<StageInfo>> fireOnceStateChangeListener = finalStageInfo -> {
              if (finalStageInfo.isPresent() && done.compareAndSet(false, true)) {
                  finalStatusListener.stateChanged(finalStageInfo.get());
              }
          };
          finalStageInfo.addStateChangeListener(fireOnceStateChangeListener);
      }