@Override
  public void onIssue(Component component, DefaultIssue issue) {
    if (issue.isNew()) {
      // analyzer can provide some tags. They must be merged with rule tags
      Rule rule = ruleRepository.getByKey(issue.ruleKey());
      issue.setTags(union(issue.tags(), rule.getTags()));
    }
  }
@Test
  public void copy_tags_if_new_external_issue() {
    externalRule.setTags(Sets.newHashSet("es_lint", "java"));
    externalIssue.setNew(true);

    underTest.onIssue(mock(Component.class), externalIssue);

    assertThat(externalIssue.tags()).containsExactly("es_lint", "java");
  }