public Result waitForConditionAndFinish(Config config, Supplier<Boolean> conditionCheck)
      throws IOException {
    return waitForConditionsAndFinish(config, conditionCheck);
  }
@Test
  public void testFinishAfterConditionTimeout() throws IOException {
    when(client.getJobStatus(any(), any(), any())).thenReturn(JobState.RUNNING);

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

    verify(client).drainJob(any(), any(), any());
    assertThat(result).isEqualTo(Result.TIMEOUT);
  }