@Test
public void testTransitionRunningToTerminateSuccessfulRun() throws Exception {

  when(flyteAdminClient.getExecution("flyte-test", "testing", "execution-name")).thenReturn(
      ExecutionOuterClass.Execution
          .newBuilder()
          .setClosure(ExecutionOuterClass.ExecutionClosure.newBuilder()
                  .setPhase(Execution.WorkflowExecution.Phase.SUCCEEDED).build())
          .build());
  flyteRunner.poll(FLYTE_EXECUTION_ID, RUN_STATE);
  verify(stateManager,  timeout(60_000)).receive(Event.terminate(WORKFLOW_INSTANCE, Optional.of(0)));
}