AggregatorRpcMessage extends NetconfRpcMessage { public String getOnlyOneTopXmlns() throws DispatchException { try { return getTopPayloads().get(0).getFirstChild().getNamespaceURI(); } catch (NoSuchElementException | IndexOutOfBoundsException ex) { LOGGER.error("getOnlyOneTopXmlns : {}", ex); throw new DispatchException("Error namespace of the message."); } } AggregatorRpcMessage(String request); NetconfRpcMessage getNetconfRpcMessage(); String getOnlyOneTopXmlns(); Document getOnlyOneTopPayload(); boolean isNetworkManagerMessage();  }
@Test public void getOnlyOneTopXmlns() throws Exception { assertEquals("urn:bbf:yang:obbaa:device-adapters", aggregatorRpcMessage.getOnlyOneTopXmlns()); }