@Test
public void testOnlySourceAttachmentsAreDownloaded() {

    Set<SW360SparseAttachment> sourceAttachments = createAttachments(1, 4);
    SW360SparseAttachment otherAttachment = createAttachment(1, 42);
    otherAttachment.setAttachmentType(SW360AttachmentType.SCREENSHOT);
    Set<SW360SparseAttachment> attachments = new HashSet<>(sourceAttachments);
    attachments.add(otherAttachment);
    SW360Release release = createReleaseWithAttachments(1, attachments);
    ReleaseWithSources releaseWithSources = createReleaseWithSources(release, sourceAttachments);
    expectDownloads(release, sourceAttachments);
    Collection<ReleaseWithSources> result =
            sourcesExporter.downloadSources(releaseAdapter, Collections.singleton(release));
    assertThat(result).containsOnly(releaseWithSources);
    verifyDownloads(release, sourceAttachments);
}