code: public static Mono<Void> waitForCompletion(CloudFoundryClient cloudFoundryClient, Duration completionTimeout, JobEntity jobEntity) {
          Mono<JobEntity> job;
  
          if (JobUtils.isComplete(jobEntity)) {
              job = Mono.just(jobEntity);
          } else {
              job = requestJobV2(cloudFoundryClient, jobEntity.getId())
                  .map(GetJobResponse::getEntity)
                  .filter(JobUtils::isComplete)
                  .repeatWhenEmpty(exponentialBackOff(Duration.ofSeconds(1), Duration.ofSeconds(15), completionTimeout));
          }
  
          return job
              .filter(entity -> "failed".equals(entity.getStatus()))
              .flatMap(JobUtils::getError);
      }
docs: Waits for a job to complete
  
  @param cloudFoundryClient the client to use to request job status
  @param completionTimeout  the amount of time to wait for the job to complete.
  @param jobEntity          the entity representing the job
  @return {@code onComplete} once job has completed