@Test
public void findUniqueArtifactsWithSameName() throws IllegalAccessException {

    //mock artifacts
    Run.Artifact artifact1 = mock(Run.Artifact.class);
    Run.Artifact artifact2 = mock(Run.Artifact.class);
    //artifact1 mocks
    when(artifact1.getFileName()).thenReturn("test-suite.log");
    MemberModifier.field(Run.Artifact.class, "relativePath").set(artifact1, "path1/test-suite.log");
    when(artifact1.getHref()).thenReturn("path1/test-suite.log");
    //artifact2 mocks
    when(artifact2.getFileName()).thenReturn("test-suite.log");
    MemberModifier.field(Run.Artifact.class, "relativePath").set(artifact2, "path2/test-suite.log");
    when(artifact2.getHref()).thenReturn("path2/test-suite.log");
    //list of artifacts
    ArrayList artifactList = new ArrayList();
    artifactList.add(artifact1);
    artifactList.add(artifact2);
    //mock run
    Run run = mock(Run.class);
    when(run.getUrl()).thenReturn("job/myfolder/job/myjob/1/");
    when(run.getArtifacts()).thenReturn(artifactList);
    Link parentLink = mock(Link.class);
    ArtifactImpl a1 = new ArtifactImpl(run, artifact1, parentLink);
    ArtifactImpl a2 = new ArtifactImpl(run, artifact2, parentLink);
    assertThat(a1.getId(), is(not(a2.getId())));
}