@Test public void extractsDefaultStringTypeConfigurationFromJsonNode() { JsonNode rootNode = jsonNode("{\"text\":\"foo\"}"); JsonNodeConfig config = new JsonNodeConfig(rootNode); assertThat(config.get("text"), isValue("foo")); assertThat(config.get("nonExistent"), isAbsent()); }
@Override public Optional<String> get(String key) { return get(key, String.class); }
JsonNodeConfig implements Configuration { @Override public Optional<String> get(String key) { return get(key, String.class); } }
JsonNodeConfig implements Configuration { @Override public Optional<String> get(String key) { return get(key, String.class); } JsonNodeConfig(JsonNode rootNode); protected  JsonNodeConfig(JsonNode rootNode, ObjectMapper mapper); }
JsonNodeConfig implements Configuration { @Override public Optional<String> get(String key) { return get(key, String.class); } JsonNodeConfig(JsonNode rootNode); protected  JsonNodeConfig(JsonNode rootNode, ObjectMapper mapper); @Override Optional<String> get(String key); @Override Optional<T> get(String property, Class<T> tClass); @Override X as(Class<X> type); @Override String toString(); }
JsonNodeConfig implements Configuration { @Override public Optional<String> get(String key) { return get(key, String.class); } JsonNodeConfig(JsonNode rootNode); protected  JsonNodeConfig(JsonNode rootNode, ObjectMapper mapper); @Override Optional<String> get(String key); @Override Optional<T> get(String property, Class<T> tClass); @Override X as(Class<X> type); @Override String toString();  }