@Test
public void testToNodeIdUsingNodeElement() throws NetconfMessageBuilderException {

    String alarmElement = "<alarms:alarm xmlns:alarms=\"urn:ietf:params:xml:ns:yang:ietf-alarms\">"
            + "<alarms:resource xmlns:if=\"urn:ietf:params:xml:ns:yang:ietf-interfaces\" xmlns:baa=\"http://www.example.com/network-manager/baa\" "
            + "xmlns:adh=\"http://www.example.com/network-manager/managed-devices\">/baa:device-manager/adh:device-holder[adh:name='OLT-2345']"
            + "/adh:device[adh:ID='R1.S1.LT1.P1.ONT1']/adh:device-specific-data/if:interfaces/if:interface[if:name='xdsl-line:1/1/1/1']</alarms:resource>"
            + "</alarms:alarm>";
    Element element = DocumentUtils.stringToDocument(alarmElement).getDocumentElement();
    ModelNodeId actualNodeId = AlarmUtil.toNodeIdUsingNodeElement(DB_ID_WITH_INTF, (Element) element.getChildNodes().item(0));
    assertEquals(INTF_MODEL_NODE_ID, actualNodeId);
}