HashMap<String, Object> source2 = new HashMap<String, Object>();
source2.put( "attr1", "source2.attr1" ); // should not be used
source2.put( "attr2", "source2.attr2" );
MultiVariableExpander expander = new MultiVariableExpander();
expander.addSource( "$", source1 );
expander.addSource( "var", source2 );
digester.setSubstitutor( new VariableSubstitutor( expander ) );
digester.addObjectCreate( "root/bean", SimpleTestBean.class );
digester.addSetProperties( "root/bean" );
digester.addSetNext( "root/bean", "addSimpleTestBean" );