@Test
public void testConnection() {

    SW360ConnectionConfigurationFactory conFactory = mock(SW360ConnectionConfigurationFactory.class);
    ServiceFactory svcFactory = mock(ServiceFactory.class);
    SW360Connection connection = mock(SW360Connection.class);
    HttpClient httpClient = mock(HttpClient.class);
    when(svcFactory.createHttpClient(true, "proxy.net", 8080))
            .thenReturn(httpClient);
    when(conFactory.createConnection(any(), eq(httpClient), eq(ServiceFactory.getObjectMapper())))
            .thenReturn(connection);
    File propertiesFile = configFile("config-with-proxy.properties");
    SW360Configuration configuration = new SW360Configuration(propertiesFile, conFactory, svcFactory);
    assertThat(configuration.getConnection()).isEqualTo(connection);
}