ConfigPropertySource extends EnumerablePropertySource<Config> { @Override public Object getProperty(String name) { return this.source.getProperty(name, null); } ConfigPropertySource(String name, Config source); @Override String[] getPropertyNames(); @Override Object getProperty(String name); void addChangeListener(ConfigChangeListener listener);  }
@Test public void testGetProperty() throws Exception { String somePropertyName = "somePropertyName"; String someValue = "someValue"; when(someConfig.getProperty(somePropertyName, null)).thenReturn(someValue); assertEquals(someValue, configPropertySource.getProperty(somePropertyName)); verify(someConfig, times(1)).getProperty(somePropertyName, null); }