@Test public void getConfiguration() { Map<String, String> entries = new HashMap<>(); entries.put("firehose.sampleservice.uri", "http: entries.put("another.sampleservice.uri", "http: entries.put("firehose.another.uri", "http: entries.put("firehose.another.applicationname", "anotherservice"); Optional<JsonObject> optionalConfiguration = EnvironmentVariables.getConfiguration(entries, "another"); assertTrue(optionalConfiguration.isPresent()); JsonObject configuration = optionalConfiguration.get(); System.out.println("configuration = " + configuration); assertThat(configuration.size(), is(2)); }
public static Optional<JsonObject> getConfiguration(String configurationName) { return getConfiguration(System.getenv(), e -> e.getKey().contains("." + configurationName + ".")); }
EnvironmentVariables { public static Optional<JsonObject> getConfiguration(String configurationName) { return getConfiguration(System.getenv(), e -> e.getKey().contains("." + configurationName + ".")); } }
EnvironmentVariables { public static Optional<JsonObject> getConfiguration(String configurationName) { return getConfiguration(System.getenv(), e -> e.getKey().contains("." + configurationName + ".")); }  }
EnvironmentVariables { public static Optional<JsonObject> getConfiguration(String configurationName) { return getConfiguration(System.getenv(), e -> e.getKey().contains("." + configurationName + ".")); }  static Optional<String> getValue(String configuration, String key); static Optional<JsonObject> getConfiguration(String configurationName); static Optional<JsonObject> getAllConfigurations(); static List<String> configurationNames(); static Optional<JsonObject> getConfiguration(Map<String, String> environmentEntries, Predicate<Map.Entry<String, String>> filter); }
EnvironmentVariables { public static Optional<JsonObject> getConfiguration(String configurationName) { return getConfiguration(System.getenv(), e -> e.getKey().contains("." + configurationName + ".")); }  static Optional<String> getValue(String configuration, String key); static Optional<JsonObject> getConfiguration(String configurationName); static Optional<JsonObject> getAllConfigurations(); static List<String> configurationNames(); static Optional<JsonObject> getConfiguration(Map<String, String> environmentEntries, Predicate<Map.Entry<String, String>> filter); static final String MANDATORY_KEY_PREFIX; }