@Test
public void testGetComponentByIdNotFound() {

    CompletableFuture<SW360Component> failedFuture = new CompletableFuture<>();
    failedFuture.completeExceptionally(new FailedRequestException("tag", HttpConstants.STATUS_ERR_NOT_FOUND));
    when(componentClient.getComponent(COMPONENT_ID)).thenReturn(failedFuture);
    Optional<SW360Component> componentById = block(componentClientAdapter.getComponentById(COMPONENT_ID));
    assertThat(componentById).isNotPresent();
}