SystemConfig implements ISystemConfig { public String getProperty( String placeholder ) { if ( !pattern.matcher( placeholder ).matches() ) { throw new IllegalArgumentException( "property does not follow the pattern ID.PROP" ); } return this.resolveValue( placeholder ); } SystemConfig();  SystemConfig( List<IConfiguration> startingConfigs ); String getProperty( String placeholder ); @Override IConfiguration getConfiguration( String configId ); @Override void registerConfiguration( IConfiguration configuration ); @Override IConfiguration[] listConfigurations();  }
@Test public void testGetProperty() throws Exception { systemConfig = new SystemConfig( configs ); String property = systemConfig.getProperty( "1.one" ); assertEquals( "un", property ); }
@Test public void testGetProperty_unknown() throws Exception { systemConfig = new SystemConfig( configs ); String property = systemConfig.getProperty( "1000.X" ); assertNull( property ); }