@Test public void testGetIntegrationByType() { Application application = mockApplication(); IntegrationSettings expected = mockIntegrationSettings(application); doReturn(expected).when(integrationService).getIntegrationByType(MOCK_APP_TYPE, DEFAULT_USER_ID); IntegrationSettings result = service.getIntegrationByType(MOCK_APP_TYPE); assertEquals(expected, result); }
public IntegrationSettings getIntegrationByType(String appType) { try { return integrationService.getIntegrationByType(appType, DEFAULT_USER_ID); } catch (ConfigurationNotFoundException e) { return null; } catch (IntegrationConfigException e) { String message = logMessage.getMessage(GET_CONFIG_FAIL, appType); String solution = logMessage.getMessage(FAIL_POD_API_SOLUTION); throw new ConfigurationProvisioningException(message, e, solution); } }
ConfigurationProvisioningService { public IntegrationSettings getIntegrationByType(String appType) { try { return integrationService.getIntegrationByType(appType, DEFAULT_USER_ID); } catch (ConfigurationNotFoundException e) { return null; } catch (IntegrationConfigException e) { String message = logMessage.getMessage(GET_CONFIG_FAIL, appType); String solution = logMessage.getMessage(FAIL_POD_API_SOLUTION); throw new ConfigurationProvisioningException(message, e, solution); } } }
ConfigurationProvisioningService { public IntegrationSettings getIntegrationByType(String appType) { try { return integrationService.getIntegrationByType(appType, DEFAULT_USER_ID); } catch (ConfigurationNotFoundException e) { return null; } catch (IntegrationConfigException e) { String message = logMessage.getMessage(GET_CONFIG_FAIL, appType); String solution = logMessage.getMessage(FAIL_POD_API_SOLUTION); throw new ConfigurationProvisioningException(message, e, solution); } }  }
ConfigurationProvisioningService { public IntegrationSettings getIntegrationByType(String appType) { try { return integrationService.getIntegrationByType(appType, DEFAULT_USER_ID); } catch (ConfigurationNotFoundException e) { return null; } catch (IntegrationConfigException e) { String message = logMessage.getMessage(GET_CONFIG_FAIL, appType); String solution = logMessage.getMessage(FAIL_POD_API_SOLUTION); throw new ConfigurationProvisioningException(message, e, solution); } }  IntegrationSettings setupConfiguration(Application application); IntegrationSettings getIntegrationByType(String appType); }
ConfigurationProvisioningService { public IntegrationSettings getIntegrationByType(String appType) { try { return integrationService.getIntegrationByType(appType, DEFAULT_USER_ID); } catch (ConfigurationNotFoundException e) { return null; } catch (IntegrationConfigException e) { String message = logMessage.getMessage(GET_CONFIG_FAIL, appType); String solution = logMessage.getMessage(FAIL_POD_API_SOLUTION); throw new ConfigurationProvisioningException(message, e, solution); } }  IntegrationSettings setupConfiguration(Application application); IntegrationSettings getIntegrationByType(String appType);  }