}
public void testGetAttributeTranslator()
{
MockControl control = newControl(Module.class);
Module m = (Module) control.getMock();
MockControl registryControl = newControl(RegistryInfrastructure.class);
RegistryInfrastructure registry = (RegistryInfrastructure) registryControl.getMock();
MockControl tmControl = newControl(TranslatorManager.class);
TranslatorManager tm = (TranslatorManager) tmControl.getMock();
MockControl symbolExpanderControl = newControl(SymbolExpander.class);
SymbolExpander symbolExpander = (SymbolExpander) symbolExpanderControl.getMock();
ElementModelImpl em = new ElementModelImpl("module");
AttributeModelImpl am = new AttributeModelImpl();
am.setName("wife");
am.setTranslator("service");
em.setElementName("fred");
em.addAttributeModel(am);
em.addRule(new CreateObjectRule(StringHolderImpl.class.getName()));
ReadAttributeRule rule = new ReadAttributeRule();
rule.setPropertyName("value");
rule.setAttributeName("wife");
em.addRule(rule);
em.addRule(new InvokeParentRule("addElement"));
SchemaImpl schema = new SchemaImpl("module");
schema.addElementModel(em);
SchemaProcessorImpl p = new SchemaProcessorImpl(null, schema);
ElementImpl element = new ElementImpl();
element.setElementName("fred");
element.addAttribute(new AttributeImpl("wife", "wilma"));
List elements = Collections.singletonList(element);
m.getRegistry();
control.setReturnValue(registry);
registry.getModule("module");
registryControl.setReturnValue(m);
m.resolveType("hivemind.test.services.impl.StringHolderImpl");
control.setReturnValue(StringHolderImpl.class);
m.getService(SymbolExpander.class);
control.setReturnValue(symbolExpander);
symbolExpander.expandSymbols("wilma", null);
symbolExpanderControl.setReturnValue("wilma");
m.getService(TranslatorManager.class);
control.setReturnValue(tm);
tm.getTranslator("service");
tmControl.setReturnValue(new NullTranslator());