### Question:
XmlDecoder implements UaDecoder { @Override public QualifiedName decodeQualifiedName(String field) { if (nextStartElement(field)) { UShort namespaceIndex = Unsigned.ushort(0); String name = ""; if (nextStartElement("NamespaceIndex")) { namespaceIndex = decodeUInt16(null); requireNextEndElement("NamespaceIndex"); } if (nextStartElement("Name")) { name = decodeString(null); requireNextEndElement("Name"); } requireNextEndElement(field); return new QualifiedName(namespaceIndex, name); } else { return QualifiedName.NULL_VALUE; } } XmlDecoder();  XmlDecoder(InputStream inputStream);  XmlDecoder(Reader reader); XmlDecoder setInput(InputStream inputStream); XmlDecoder setInput(Reader reader); @Override Boolean decodeBoolean(String field); @Override Byte decodeSByte(String field); @Override Short decodeInt16(String field); @Override Integer decodeInt32(String field); @Override Long decodeInt64(String field); @Override UByte decodeByte(String field); @Override UShort decodeUInt16(String field); @Override UInteger decodeUInt32(String field); @Override ULong decodeUInt64(String field); @Override Float decodeFloat(String field); @Override Double decodeDouble(String field); @Override String decodeString(String field); @Override DateTime decodeDateTime(String field); @Override UUID decodeGuid(String field); @Override ByteString decodeByteString(String field); @Override XmlElement decodeXmlElement(String field); @Override NodeId decodeNodeId(String field); @Override ExpandedNodeId decodeExpandedNodeId(String field); @Override StatusCode decodeStatusCode(String field); @Override QualifiedName decodeQualifiedName(String field); @Override LocalizedText decodeLocalizedText(String field); @Override ExtensionObject decodeExtensionObject(String field); @Override DataValue decodeDataValue(String field); @Override Variant decodeVariant(String field); Object decodeVariantValue(); @Override DiagnosticInfo decodeDiagnosticInfo(String field); @Override T decodeMessage(String field); @Override T decodeEnumeration(String field, Class<T> clazz); @Override T decodeSerializable(String field, Class<T> clazz); @Override T[] decodeArray(String field, Function<String, T> decoder, Class<T> clazz); @Override T[] decodeArray(String field, BiFunction<String, Class<T>, T> decoder, Class<T> clazz);  }### Answer:
@Test public void testDecodeQualifiedName() throws XMLStreamException { XmlDecoder decoder = new XmlDecoder(); decoder.setInput(new ByteArrayInputStream("<Value><NamespaceIndex>1</NamespaceIndex><Name>test</Name></Value>".getBytes())); QualifiedName qualifiedName = decoder.decodeQualifiedName("Value"); assertEquals(qualifiedName.getNamespaceIndex(), ushort(1)); assertEquals(qualifiedName.getName(), "test"); }