@Test public void test_mapping_props_json_with_defaults() throws URISyntaxException, IOException { Properties props = Props.load(read("/config1_with_defaults.properties")); Cluster fromProps = new ClusterFactory().create(props); Cluster fromJson = json.readValue(read("/config1.json"), Cluster.class); assertThat(json.writeValueAsString(fromProps), fromProps, is(equalTo(fromJson))); assertThat( Props.toString(fromJson.toProperties(false, true, true)), fromJson.toProperties(false, true, true), is(equalTo(props))); assertThat( Props.toString(fromJson.toProperties(false, true, true)), fromJson.toProperties(false, true, true), is(equalTo(fromProps.toProperties(false, true, true)))); assertThat( json.writeValueAsString(fromProps), fromProps, is(equalTo(fromJson))); }
public Cluster create(Path configFile) { return create(Props.load(configFile)); }
ClusterFactory { public Cluster create(Path configFile) { return create(Props.load(configFile)); } }
ClusterFactory { public Cluster create(Path configFile) { return create(Props.load(configFile)); } ClusterFactory();  ClusterFactory(Version version); }
ClusterFactory { public Cluster create(Path configFile) { return create(Props.load(configFile)); } ClusterFactory();  ClusterFactory(Version version); Cluster create(Path configFile); Cluster create(Properties properties); Cluster create(Properties properties, Consumer<Configuration> added); Cluster create(Map<Setting, String> paramValueMap, IParameterSubstitutor parameterSubstitutor); }
ClusterFactory { public Cluster create(Path configFile) { return create(Props.load(configFile)); } ClusterFactory();  ClusterFactory(Version version); Cluster create(Path configFile); Cluster create(Properties properties); Cluster create(Properties properties, Consumer<Configuration> added); Cluster create(Map<Setting, String> paramValueMap, IParameterSubstitutor parameterSubstitutor);  }