PropertyListFactoryBean extends PropertiesLoaderSupport implements FactoryBean { @Override public Object getObject() throws Exception { return PropertiesHelper.segment( mergeProperties() ); }  @Override Object getObject(); @Override Class getObjectType(); @Override boolean isSingleton();  }
@Test public void testBreaksPropertiesFileIntoAList() throws Exception { PropertyListFactoryBean bean = new PropertyListFactoryBean(); Properties properties = new Properties(); properties.setProperty( "foodmart.name", "Foodmart" ); properties.setProperty( "foodmart.connectString", "jdbc:mondrian:host=aplace" ); properties.setProperty( "sample.name", "Samples" ); properties.setProperty( "sample.connectString", "jdbc:mondrian:host=overthere" ); bean.setProperties( properties ); List<Properties> list = (List<Properties>) bean.getObject(); Properties foodmart = list.get( 0 ); Assert.assertEquals( "Foodmart", foodmart.getProperty( "name" ) ); Assert.assertEquals( "jdbc:mondrian:host=aplace", foodmart.getProperty( "connectString" ) ); Properties sample = list.get( 1 ); Assert.assertEquals( "Samples", sample.getProperty( "name" ) ); Assert.assertEquals( "jdbc:mondrian:host=overthere", sample.getProperty( "connectString" ) ); }