@Test
public void testToNodeIdUsingNodeElementWhenNamespaceMissingException() throws NetconfMessageBuilderException {

    String alarmElement = "<alarms:alarm xmlns:alarms=\"urn:ietf:params:xml:ns:yang:ietf-alarms\">"
            + "<alarms:resource>/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();
    m_expectedException.expect(AlarmProcessingException.class);
    m_expectedException.expectMessage("Namespace is missing for prefix 'baa' in resource");
    AlarmUtil.toNodeIdUsingNodeElement(DB_ID_WITH_INTF, (Element) element.getChildNodes().item(0));
}