@Test
public void testFindReleaseForArtifactPresentComponent() {

    final String version = "version";
    final Artifact artifact = new Artifact()
            .addFact(new ArtifactCoordinates(new Coordinate("name", version)));
    final String componentName = ArtifactToComponentUtils.createComponentName(artifact);
    final SW360Component sw360Component = new SW360Component();
    final SW360Release release = new SW360Release();
    when(componentClientAdapter.getComponentByName(componentName))
            .thenReturn(Optional.of(sw360Component));
    when(releaseClientAdapter.getReleaseByVersion(sw360Component, version))
            .thenReturn(Optional.of(release));
    setUp();
    final Optional<SW360Release> releaseForArtifact = metaDataReceiver.findReleaseForArtifact(artifact);
    assertThat(releaseForArtifact).isPresent();
    assertThat(releaseForArtifact).hasValue(release);
    verify(componentClientAdapter, times(1)).getComponentByName(componentName);
    verify(releaseClientAdapter, times(1)).getReleaseByVersion(sw360Component, version);
}