public Optional<PushEventDto> raiseEventOnIssue(String projectUuid, DefaultIssue currentIssue) {
    var currentIssueComponentUuid = currentIssue.componentUuid();
    if (currentIssueComponentUuid == null) {
      return Optional.empty();
    }

    var component = treeRootHolder.getComponentByUuid(currentIssueComponentUuid);

    if (isTaintVulnerability(currentIssue)) {
      return raiseTaintVulnerabilityEvent(projectUuid, component, currentIssue);
    }
    if (isSecurityHotspot(currentIssue)) {
      return raiseSecurityHotspotEvent(projectUuid, component, currentIssue);
    }
    return Optional.empty();
  }
@Test
  public void raiseEventOnIssue_whenNewHotspot_shouldCreateRaisedEvent() {
    DefaultIssue defaultIssue = createDefaultIssue()
      .setType(RuleType.SECURITY_HOTSPOT)
      .setStatus(Issue.STATUS_TO_REVIEW)
      .setNew(true)
      .setRuleDescriptionContextKey(randomAlphabetic(6));

    assertThat(underTest.raiseEventOnIssue("some-project-uuid", defaultIssue))
      .isNotEmpty()
      .hasValueSatisfying(pushEventDto -> {
        assertThat(pushEventDto.getName()).isEqualTo(SecurityHotspotRaised.EVENT_NAME);
        verifyHotspotRaisedEventPayload(pushEventDto.getPayload(), defaultIssue);
        assertThat(pushEventDto.getLanguage()).isEqualTo("java");
        assertThat(pushEventDto.getProjectUuid()).isEqualTo("some-project-uuid");
      });
  }