@Test(expected = ConfigurationProvisioningException.class) public void testGetIntegrationByTypeConfigException() { doThrow(RemoteConfigurationException.class).when(integrationService) .getIntegrationByType(MOCK_APP_TYPE, DEFAULT_USER_ID); service.getIntegrationByType(MOCK_APP_TYPE); }
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);  }