@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); }
public SW360Connection getConnection() { return connection; }
SW360Configuration extends ConfigurableWorkflowItem { public SW360Connection getConnection() { return connection; } }
SW360Configuration extends ConfigurableWorkflowItem { public SW360Connection getConnection() { return connection; } SW360Configuration(File propertiesFile);   SW360Configuration(File propertiesFile, SW360ConnectionConfigurationFactory factory,
                       ServiceFactory serviceFactory); }
SW360Configuration extends ConfigurableWorkflowItem { public SW360Connection getConnection() { return connection; } SW360Configuration(File propertiesFile);   SW360Configuration(File propertiesFile, SW360ConnectionConfigurationFactory factory,
                       ServiceFactory serviceFactory); Path getBaseDir(); Path getSourcesPath(); Path getCsvFilePath(); String getProperty(String key); SW360Connection getConnection(); Boolean getBooleanConfigValue(String key); void logConfiguration(Logger logger); }
SW360Configuration extends ConfigurableWorkflowItem { public SW360Connection getConnection() { return connection; } SW360Configuration(File propertiesFile);   SW360Configuration(File propertiesFile, SW360ConnectionConfigurationFactory factory,
                       ServiceFactory serviceFactory); Path getBaseDir(); Path getSourcesPath(); Path getCsvFilePath(); String getProperty(String key); SW360Connection getConnection(); Boolean getBooleanConfigValue(String key); void logConfiguration(Logger logger);  }