@Test
public void testDeleteSpecificAttachment() {

    SW360SparseAttachment attachment1 = createAttachment("source1", SW360AttachmentType.SOURCE);
    SW360SparseAttachment attachment2 = createAttachment("source2", SW360AttachmentType.SOURCE);
    SW360Release release = addAttachment(addAttachment(createRelease(RELEASE_NAME), attachment1), attachment2);
    SW360Release updatedRelease = addAttachment(createRelease(RELEASE_NAME), attachment2);
    when(releaseClientAdapter.deleteAttachments(release, Collections.singleton(attachment1.getId())))
            .thenReturn(updatedRelease);
    SW360Release result = metaDataUpdater.deleteAttachments(release,
            attachment -> attachment1.getFilename().equals(attachment.getFilename()));
    assertThat(result).isEqualTo(updatedRelease);
}