@Test
public void testUploadAttachments() throws IOException {

    SW360Release release = createRelease(RELEASE_NAME);
    Path uploadPath = createTestFile(attachmentPath("upload.doc"), TEST_FILE_CONTENT);
    SW360AttachmentType attachmentType = SW360AttachmentType.SOURCE;
    Map<Path, SW360AttachmentType> attachments = Collections.singletonMap(uploadPath, attachmentType);
    AttachmentUploadRequest<SW360Release> expRequest = AttachmentUploadRequest.builder(release)
            .addAttachment(uploadPath, attachmentType)
            .build();
    AttachmentUploadResult<SW360Release> expResult = new AttachmentUploadResult<>(createRelease("update"));
    when(releaseClientAdapter.uploadAttachments(expRequest))
            .thenReturn(expResult);
    AttachmentUploadResult<SW360Release> uploadResult =
            metaDataUpdater.uploadAttachments(release, attachments, false);
    assertThat(uploadResult).isEqualTo(expResult);
    verify(releaseClientAdapter).uploadAttachments(expRequest);
    verifyNoMoreInteractions(releaseClientAdapter);
}