@Test
public void testTriggerInstanceRunningStatus() throws Exception {

  final List<DependencyInstance> dependencyInstanceList = new ArrayList<>();
  TriggerInstance ti = null;
  dependencyInstanceList
      .add(createTestDependencyInstance(Status.RUNNING, CancellationCause.MANUAL));
  dependencyInstanceList
      .add(createTestDependencyInstance(Status.SUCCEEDED, CancellationCause.NONE));
  dependencyInstanceList
      .add(createTestDependencyInstance(Status.SUCCEEDED, CancellationCause.NONE));
  ti = new TriggerInstance("1", null,
      "1", 1, "test", dependencyInstanceList,
      -1, null);
  assertThat(ti.getStatus()).isEqualTo(Status.RUNNING);
  dependencyInstanceList.clear();
  dependencyInstanceList
      .add(createTestDependencyInstance(Status.RUNNING, CancellationCause.MANUAL));
  ti = new TriggerInstance("1", null,
      "1", 1, "test", dependencyInstanceList,
      -1, null);
  assertThat(ti.getStatus()).isEqualTo(Status.RUNNING);
  dependencyInstanceList.clear();
}