@Test
void shouldCreateConsoleDetailForSourceLinksIfFileNameIsSelf() {

    JenkinsFacade jenkins = mock(JenkinsFacade.class);
    BuildFolderFacade buildFolder = mock(BuildFolderFacade.class);
    when(buildFolder.readConsoleLog(any())).thenReturn(createLines());
    DetailFactory detailFactory = new DetailFactory(jenkins, buildFolder);
    Report report = new Report();
    IssueBuilder issueBuilder = new IssueBuilder();
    issueBuilder.setFileName(ConsoleLogHandler.JENKINS_CONSOLE_LOG_FILE_NAME_ID);
    Issue issue = issueBuilder.build();
    report.add(issue);
    Object details = detailFactory.createTrendDetails("source." + issue.getId().toString(),
            RUN, createResult(), report, NEW_ISSUES, OUTSTANDING_ISSUES, FIXED_ISSUES, ENCODING, createParent());
    assertThat(details).isInstanceOf(ConsoleDetail.class);
    assertThat(((ConsoleDetail) details).getSourceCode()).contains(AFFECTED_FILE_CONTENT);
}