}
// Create and name an Interface Element
DescriptionElement desc = factory.newDescription();
InterfaceElement interfaceElement = desc.addInterfaceElement();
interfaceElement.setName(new NCName("interface1"));
// Create a binding from the description
fBindingElement = desc.addBindingElement();
fBindingElement.setName(new NCName("binding1"));
desc.toComponent();
Binding binding = desc.toComponent().getBinding(new QName("binding1"));
// getInterface() - interface attribute unspecified, but hierarchy in place:
retrievedInterface = binding.getInterface();
assertNull("Retrieved Interface should be null if interface attribute unspecified -", retrievedInterface);
// getInterface() - interface attribute specified, and hierarchy in place:
// Set the "interface" attribute to reference the new Interface Element
// (have to recreate whole desc hierarchy as toComponent() will not rerun if already run!)
desc = factory.newDescription();
interfaceElement = desc.addInterfaceElement();
interfaceElement.setName(new NCName("interface1"));
fBindingElement = desc.addBindingElement();
fBindingElement.setName(new NCName("binding1"));
fBindingElement.setInterfaceName(new QName("interface1"));
//fDescriptionElement.toComponent();
binding = desc.toComponent().getBinding(new QName("binding1"));