@Test public void assertLoadWithoutConfig() { assertFalse(configService.load("test_job").isPresent()); }
public Optional<CloudJobConfigurationPOJO> load(final String jobName) { String configContent = regCenter.get(CloudJobConfigurationNode.getRootNodePath(jobName)); return Strings.isNullOrEmpty(configContent) ? Optional.empty() : Optional.of(YamlEngine.unmarshal(configContent, CloudJobConfigurationPOJO.class)); }
CloudJobConfigurationService { public Optional<CloudJobConfigurationPOJO> load(final String jobName) { String configContent = regCenter.get(CloudJobConfigurationNode.getRootNodePath(jobName)); return Strings.isNullOrEmpty(configContent) ? Optional.empty() : Optional.of(YamlEngine.unmarshal(configContent, CloudJobConfigurationPOJO.class)); } }
CloudJobConfigurationService { public Optional<CloudJobConfigurationPOJO> load(final String jobName) { String configContent = regCenter.get(CloudJobConfigurationNode.getRootNodePath(jobName)); return Strings.isNullOrEmpty(configContent) ? Optional.empty() : Optional.of(YamlEngine.unmarshal(configContent, CloudJobConfigurationPOJO.class)); }  }
CloudJobConfigurationService { public Optional<CloudJobConfigurationPOJO> load(final String jobName) { String configContent = regCenter.get(CloudJobConfigurationNode.getRootNodePath(jobName)); return Strings.isNullOrEmpty(configContent) ? Optional.empty() : Optional.of(YamlEngine.unmarshal(configContent, CloudJobConfigurationPOJO.class)); }  void add(final CloudJobConfigurationPOJO cloudJobConfig); void update(final CloudJobConfigurationPOJO cloudJobConfig); Collection<CloudJobConfigurationPOJO> loadAll(); Optional<CloudJobConfigurationPOJO> load(final String jobName); void remove(final String jobName); }
CloudJobConfigurationService { public Optional<CloudJobConfigurationPOJO> load(final String jobName) { String configContent = regCenter.get(CloudJobConfigurationNode.getRootNodePath(jobName)); return Strings.isNullOrEmpty(configContent) ? Optional.empty() : Optional.of(YamlEngine.unmarshal(configContent, CloudJobConfigurationPOJO.class)); }  void add(final CloudJobConfigurationPOJO cloudJobConfig); void update(final CloudJobConfigurationPOJO cloudJobConfig); Collection<CloudJobConfigurationPOJO> loadAll(); Optional<CloudJobConfigurationPOJO> load(final String jobName); void remove(final String jobName);  }