google-api-services-common/src/testFixtures/java/bio/terra/cloudres/google/api/services/common/testing/OperationTestUtils.java
/**
   * Poll the operation until it completes and assert that it completed successfully. Returns the
   * final operation.
   */
Poll the operation until it completes and assert that it completed successfully. Returns the
final operation.
Poll the operation until it completes and assert that it completed successfully . Returns the final operation .
public static <T> OperationCow<T> pollAndAssertSuccess(
      OperationCow<T> operation, Duration pollingInterval, Duration timeout)
      throws IOException, InterruptedException {
    OperationCow<T> completed =
        OperationUtils.pollUntilComplete(operation, pollingInterval, timeout);
    assertNull(completed.getOperationAdapter().getError());
    assertTrue(completed.getOperationAdapter().getDone());
    return completed;
  }
public static < T > OperationCow < T > pollAndAssertSuccess ( OperationCow < T > operation , Duration pollingInterval , Duration timeout ) throws IOException , InterruptedException { OperationCow < T > completed = OperationUtils . pollUntilComplete ( operation , pollingInterval , timeout ) ; assertNull ( completed . getOperationAdapter ( ) . getError ( ) ) ; assertTrue ( completed . getOperationAdapter ( ) . getDone ( ) ) ; return completed ; }
Poll the operation until it completes and assert that it completed successfully.
Poll the operation until it completes and assert that it completed successfully .