public Result waitForCondition(Config config, Supplier<Boolean>... conditionCheck) {
    return finishOrTimeout(
        config,
        conditionCheck,
        () -> jobIsDoneOrFinishing(config.project(), config.region(), config.jobId()));
  }
@Test
  public void testWaitForConditionTimeout() throws IOException {
    when(client.getJobStatus(any(), any(), any())).thenReturn(JobState.RUNNING);

    Result result = new PipelineOperator(client).waitForCondition(DEFAULT_CONFIG, () -> false);

    assertThat(result).isEqualTo(Result.TIMEOUT);
  }