@Test public void test_toProperties() { Stream.of( tuple2(fixPaths(cluster.toProperties(false, true, true)), "config_with_defaults.properties"), tuple2(cluster.toProperties(false, false, true), "config_without_defaults.properties"), tuple2(fixPaths(cluster.toProperties(true, true, true)), "config_expanded_default.properties"), tuple2(cluster.toProperties(true, false, true), "config_expanded_without_default.properties") ).forEach(rethrow(tuple -> { Properties expectedProps = Props.load(Paths.get(getClass().getResource("/config-property-files/" + tuple.t2).toURI())); assertThat( "File: " + tuple.t2 + " should perhaps be:\n" + Props.toString(tuple.t1), tuple.t1, is(equalTo(expectedProps))); Cluster expectedCluster = new ClusterFactory().create(expectedProps); assertThat( "File: " + tuple.t2, expectedCluster, either(equalTo(cluster)).or(equalTo(clusterWithDefaults))); })); }
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);  }