@Test
public void testUpdaterArtifactToReleaseAdditionalUpload() throws IOException {

    Path uploadPath = createTestFile();
    Map<Path, SW360AttachmentType> uploadMap =
            Collections.singletonMap(uploadPath, SW360AttachmentType.CLEARING_REPORT);
    Artifact artifact = TestUtils.mkArtifact("test", false);
    SW360Release release = createRelease("test", null);
    SW360Release createdRelease = createRelease("testCreated", null);
    SW360Release uploadedRelease = createRelease("uploadedRelease", null);
    AttachmentUploadResult<SW360Release> uploadResult = new AttachmentUploadResult<>(uploadedRelease);
    when(metaDataUpdater.getOrCreateRelease(release, false))
            .thenReturn(createdRelease);
    when(metaDataUpdater.uploadAttachments(createdRelease, uploadMap, false))
            .thenReturn(uploadResult);
    SW360UpdaterImpl updater = new SW360UpdaterImpl(metaDataUpdater, "test", "version",
            false, false, false);
    AttachmentUploadResult<SW360Release> result =
            updater.artifactToReleaseWithUploads(artifact, release, uploadMap);
    assertThat(result).isEqualTo(uploadResult);
}