DefaultConfigValueEvaluator implements ConfigValueEvaluator { @Override public PropertyValue evaluateRawValue(String key, ConfigurationContext context) { PropertyValue unfilteredValue = null; for (PropertySource propertySource : context.getPropertySources()) { PropertyValue val = propertySource.get(key); if(val!=null){ unfilteredValue = val; } } if(unfilteredValue==null || (unfilteredValue.getValueType()== PropertyValue.ValueType.VALUE && unfilteredValue.getValue()==null)){ return null; } return unfilteredValue; }  @Override PropertyValue evaluateRawValue(String key, ConfigurationContext context); @Override Map<String, PropertyValue> evaluateRawValues(ConfigurationContext context); @Override String toString();  }
@Test public void testEvaluteRawValue() { Configuration config = Configuration.current(); DefaultConfigValueEvaluator instance = new DefaultConfigValueEvaluator(); PropertyValue result = instance.evaluateRawValue("confkey1", config.getContext()); assertThat(result.getValue()).isEqualTo("javaconf-value1"); result = instance.evaluateRawValue("missing", config.getContext()); assertThat(result).isNull(); }