@Test
public void testUploadAttachmentsConflictNoForce() throws IOException {

    Path uploadPath = createTestFile(attachmentPath("upload.doc"), TEST_FILE_CONTENT + "_changed");
    SW360AttachmentType attachmentType = SW360AttachmentType.SOURCE;
    SW360SparseAttachment attachment = createAttachment(uploadPath.getFileName().toString(), attachmentType);
    SW360Release release = addAttachment(createRelease(RELEASE_NAME), attachment);
    Map<Path, SW360AttachmentType> attachments = Collections.singletonMap(uploadPath, attachmentType);
    AttachmentUploadResult<SW360Release> uploadResult =
            metaDataUpdater.uploadAttachments(release, attachments, false);
    assertThat(uploadResult.getTarget()).isEqualTo(release);
    assertThat(uploadResult.successfulUploads()).isEmpty();
    AttachmentUploadRequest.Item expFailedItem = new AttachmentUploadRequest.Item(uploadPath, attachmentType);
    assertThat(uploadResult.failedUploads().keySet())
            .containsOnly(expFailedItem);
    Throwable throwable = uploadResult.failedUploads().get(expFailedItem);
    assertThat(throwable).isInstanceOf(IllegalStateException.class);
    assertThat(throwable.getMessage()).contains(uploadPath.toString());
}