@Test
public void shouldCleanupPodWhenMissingFinishedAt() {

  // inject mock status in real instance
  createdPod.setStatus(podStatus);
  when(podStatus.getContainerStatuses()).thenReturn(List.of(containerStatus, keepaliveContainerStatus));
  when(containerStatus.getName()).thenReturn(MAIN_CONTAINER_NAME);
  when(containerStatus.getState()).thenReturn(containerState);
  when(containerState.getTerminated()).thenReturn(containerStateTerminated);
  var runState = RunState.create(WORKFLOW_INSTANCE, State.TERMINATED);
  var shouldDelete = kdr.shouldDeletePodWithRunState(WORKFLOW_INSTANCE, createdPod, runState);
  assertThat(shouldDelete, is(true));
}