@Test public void test_mapping_props_json_without_defaults() throws URISyntaxException, IOException { Properties props = Props.load(read("/config1_without_defaults.properties")); Cluster fromJson = json.readValue(read("/config2.json"), Cluster.class); Cluster fromProps = new ClusterFactory().create(props); assertThat(json.writeValueAsString(fromProps), fromProps, is(equalTo(fromJson))); assertThat( Props.toString(fromJson.toProperties(false, false, true)), fromJson.toProperties(false, false, true), is(equalTo(props))); assertThat( Props.toString(fromJson.toProperties(false, false, true)), fromJson.toProperties(false, false, true), is(equalTo(fromProps.toProperties(false, false, 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);  }