@Test
void shouldExportTestResultToJira() {

    final LaunchResults launchResults = mock(LaunchResults.class);
    final TestResult testResult = new TestResult()
            .setLabels(Collections.singletonList(new Label().setName("testClass").setValue(TEST_CLASS)));
    final Set<TestResult> results = new HashSet<>(Collections.singletonList(testResult));
    when(launchResults.getAllResults()).thenReturn(results);
    final IdeaLinksPlugin jiraTestResultExportPlugin = new IdeaLinksPlugin(true, 63342);
    jiraTestResultExportPlugin.aggregate(
            mock(Configuration.class),
            Collections.singletonList(launchResults),
            Paths.get("/")
    );
    assertThat(testResult.getLinks()).hasSize(1);
    final Link link = testResult.getLinks().get(0);
    assertThat(link.getName()).isEqualTo("Open in Idea");
    assertThat(link.getType()).isEqualTo("idea");
    assertThat(link.getUrl()).contains(TEST_CLASS.replace(".", "/"));
}