@Test
public void testGetReleaseByVersion() {

    SW360SparseRelease sparseRelease = new SW360SparseRelease()
            .setVersion(RELEASE_VERSION1);
    String releaseHref = "url/" + ID;
    Self releaseSelf = new Self().setHref(releaseHref);
    LinkObjects links = new LinkObjects();
    links.setSelf(releaseSelf);
    sparseRelease.setLinks(links);
    String componentName = "componentName";
    SW360Component component = getSw360Component(sparseRelease, componentName);
    when(releaseClient.getRelease(ID))
            .thenReturn(CompletableFuture.completedFuture(release));
    final Optional<SW360Release> releaseByVersion =
            block(releaseClientAdapter.getReleaseByVersion(component, release.getVersion()));
    assertThat(releaseByVersion).isPresent();
    assertThat(releaseByVersion).hasValue(release);
    verify(releaseClient, times(1)).getRelease(ID);
}