@Test
public void testUploadAttachmentsDuplicate() {

    String fileName = "alreadyExistingAttachment.1st";
    Path uploadPath = Paths.get(fileName);
    SW360AttachmentType attachmentType = SW360AttachmentType.LEGAL_EVALUATION;
    release.setEmbedded(createEmbeddedReleaseWithAttachments(fileName));
    AttachmentUploadRequest<SW360Release> uploadRequest = AttachmentUploadRequest.builder(release)
            .addAttachment(uploadPath, attachmentType)
            .build();
    AttachmentUploadResult<SW360Release> result = block(releaseClientAdapter.uploadAttachments(uploadRequest));
    assertThat(result.getTarget()).isEqualTo(release);
    assertThat(result.isSuccess()).isFalse();
    assertThat(result.failedUploads().get(new AttachmentUploadRequest.Item(uploadPath, attachmentType)))
            .isInstanceOf(SW360ClientException.class);
    verifyZeroInteractions(releaseClient);
}