@Test
public void testMetaDataReceiverIsCreated() {

    SW360ConnectionConfigurationFactory connectionFactory = mock(SW360ConnectionConfigurationFactory.class);
    HttpClient httpClient = mock(HttpClient.class);
    ObjectMapper mapper = mock(ObjectMapper.class);
    SW360Connection connection = mock(SW360Connection.class);
    when(antennaContextMock.getHttpClient()).thenReturn(httpClient);
    when(antennaContextMock.getObjectMapper()).thenReturn(mapper);
    when(connectionFactory.createConnection(any(), eq(httpClient), eq(mapper))).thenReturn(connection);
    sw360Enricher = new SW360Enricher(connectionFactory);
    sw360Enricher.setAntennaContext(antennaContextMock);
    SW360MetaDataReceiver metaDataReceiver = sw360Enricher.createMetaDataReceiver(createStandardConfigMap());
    assertThat(metaDataReceiver).isNotNull();
    @SuppressWarnings("unchecked")
    ArgumentCaptor<SW360ConnectionConfigurationFactory.Getter<String>> captor =
            ArgumentCaptor.forClass(SW360ConnectionConfigurationFactory.Getter.class);
    verify(connectionFactory).createConnection(captor.capture(), eq(httpClient), eq(mapper));
    SW360ConnectionConfigurationFactory.Getter<String> getter = captor.getValue();
    for (Map.Entry<String, String> e : createStandardConfigMap().entrySet()) {
        assertThat(getter.apply(e.getKey())).isEqualTo(e.getValue());
    }
    verify(connection).getReleaseAdapter();
    verify(antennaContextMock).getHttpClient();
    verify(antennaContextMock).getObjectMapper();
}