@Test
public void testGetOrCreateRelease() {

    final SW360Release release = new SW360Release();
    release.setName("test-component");
    release.setVersion("0.1-alpha");
    final SW360Release newRelease = new SW360Release();
    when(releaseClientAdapter.getSparseReleaseByExternalIds(any())).thenReturn(Optional.empty());
    when(releaseClientAdapter.getSparseReleaseByNameAndVersion(release.getName(), release.getVersion()))
            .thenReturn(Optional.empty());
    when(releaseClientAdapter.createRelease(release)).thenReturn(newRelease);
    assertThat(metaDataUpdater.getOrCreateRelease(release, true)).isEqualTo(newRelease);
    verify(releaseClientAdapter, never()).updateRelease(any());
}