@Override
  public void execute(ComputationStep.Context context) {
    // no notification on pull requests as there is no real Quality Gate on those
    if (analysisMetadataHolder.isPullRequest()) {
      return;
    }
    executeForProject(treeRootHolder.getRoot());
  }
@Test
  public void no_alert_on_pull_request_branches() {
    Branch pr = mock(Branch.class);
    when(pr.getType()).thenReturn(BranchType.PULL_REQUEST);
    analysisMetadataHolder.setBranch(pr);
    TreeRootHolder treeRootHolder = mock(TreeRootHolder.class);
    MetricRepository metricRepository = mock(MetricRepository.class);
    MeasureRepository measureRepository = mock(MeasureRepository.class);
    EventRepository eventRepository = mock(EventRepository.class);
    NotificationService notificationService = mock(NotificationService.class);

    QualityGateEventsStep underTest = new QualityGateEventsStep(treeRootHolder, metricRepository, measureRepository,
      eventRepository, notificationService, analysisMetadataHolder);

    underTest.execute(new TestComputationStepContext());

    verifyNoInteractions(treeRootHolder, metricRepository, measureRepository, eventRepository, notificationService);
  }