@Override
  public void execute(ComputationStep.Context context) {
    for (TriggerViewRefreshDelegate triggerViewRefreshDelegate : this.triggerViewRefreshDelegates) {
      OptionalInt count = triggerViewRefreshDelegate.triggerFrom(analysisMetadata.getProject());
      count.ifPresent(i -> context.getStatistics().add("refreshes" + triggerViewRefreshDelegate.getQualifier(), i));
    }
  }
@Test
  public void execute_calls_delegate_with_project_from_holder_if_passed_to_constructor() {
    TriggerViewRefreshDelegate delegate = mock(TriggerViewRefreshDelegate.class);
    Project project = mock(Project.class);
    when(analysisMetadataHolder.getProject()).thenReturn(project);
    TriggerViewRefreshStep underTest = new TriggerViewRefreshStep(analysisMetadataHolder, new TriggerViewRefreshDelegate[]{delegate});

    underTest.execute(new TestComputationStepContext());

    verify(analysisMetadataHolder).getProject();
    verify(delegate).triggerFrom(project);
  }