Attribute attribute = new AttributeImpl("fred", "${flintstone}");
element.addAttribute(attribute);
PushAttributeRule rule = new PushAttributeRule();
rule.setAttributeName("fred");
SchemaProcessor mockProcessor = (SchemaProcessor) control.getMock();
mockProcessor.getContributingModule();
MockControl moduleControl = newControl(Module.class);
Module mockModule = (Module) moduleControl.getMock();
control.setReturnValue(mockModule);
MockControl symbolExpanderControl = newControl(SymbolExpander.class);
SymbolExpander symbolExpander = (SymbolExpander) symbolExpanderControl.getMock();
mockProcessor.getSymbolExpander();
control.setReturnValue(symbolExpander);
mockProcessor.getAttributeTranslator("fred");
control.setReturnValue(new NullTranslator());
mockProcessor.getContributingModule();
control.setReturnValue(mockModule);
symbolExpander.expandSymbols("${flintstone}", element.getLocation());
symbolExpanderControl.setReturnValue("FLINTSTONE");
mockProcessor.push("FLINTSTONE");
mockProcessor.pop();
control.setReturnValue("FLINTSTONE");
replayControls();
rule.begin(mockProcessor, element);
rule.end(mockProcessor, element);
verifyControls();
}