@Test public void assertLoadWithoutConfig() { assertFalse(configService.load("test_app").isPresent()); }
public Optional<CloudAppConfigurationPOJO> load(final String appName) { String configContent = regCenter.get(CloudAppConfigurationNode.getRootNodePath(appName)); return Strings.isNullOrEmpty(configContent) ? Optional.empty() : Optional.of(YamlEngine.unmarshal(configContent, CloudAppConfigurationPOJO.class)); }
CloudAppConfigurationService { public Optional<CloudAppConfigurationPOJO> load(final String appName) { String configContent = regCenter.get(CloudAppConfigurationNode.getRootNodePath(appName)); return Strings.isNullOrEmpty(configContent) ? Optional.empty() : Optional.of(YamlEngine.unmarshal(configContent, CloudAppConfigurationPOJO.class)); } }
CloudAppConfigurationService { public Optional<CloudAppConfigurationPOJO> load(final String appName) { String configContent = regCenter.get(CloudAppConfigurationNode.getRootNodePath(appName)); return Strings.isNullOrEmpty(configContent) ? Optional.empty() : Optional.of(YamlEngine.unmarshal(configContent, CloudAppConfigurationPOJO.class)); }  }
CloudAppConfigurationService { public Optional<CloudAppConfigurationPOJO> load(final String appName) { String configContent = regCenter.get(CloudAppConfigurationNode.getRootNodePath(appName)); return Strings.isNullOrEmpty(configContent) ? Optional.empty() : Optional.of(YamlEngine.unmarshal(configContent, CloudAppConfigurationPOJO.class)); }  void add(final CloudAppConfigurationPOJO appConfig); void update(final CloudAppConfigurationPOJO appConfig); Optional<CloudAppConfigurationPOJO> load(final String appName); Collection<CloudAppConfigurationPOJO> loadAll(); void remove(final String appName); }
CloudAppConfigurationService { public Optional<CloudAppConfigurationPOJO> load(final String appName) { String configContent = regCenter.get(CloudAppConfigurationNode.getRootNodePath(appName)); return Strings.isNullOrEmpty(configContent) ? Optional.empty() : Optional.of(YamlEngine.unmarshal(configContent, CloudAppConfigurationPOJO.class)); }  void add(final CloudAppConfigurationPOJO appConfig); void update(final CloudAppConfigurationPOJO appConfig); Optional<CloudAppConfigurationPOJO> load(final String appName); Collection<CloudAppConfigurationPOJO> loadAll(); void remove(final String appName);  }