@Test
public void testNoDownloadIfIdenticalFileExists() {

    SW360SparseAttachment attachment = createAttachment(1, 1);
    attachment.setSha1(TEST_FILE_SHA1);
    SW360Release release = createReleaseWithAttachments(1, Collections.singleton(attachment));
    ReleaseWithSources releaseWithSources =
            createReleaseWithSources(release, Collections.singleton(attachment));
    createTestFile(attachmentPath(release, attachment));
    Collection<ReleaseWithSources> result =
            sourcesExporter.downloadSources(releaseAdapter, Collections.singleton(release));
    assertThat(result).containsOnly(releaseWithSources);
}