NetconfMessageUtil { public static String buildModuleCapability(ModuleIdentifier moduleIdentifier) { return String.format("%s?module=%s&revision=%s", moduleIdentifier.getNamespace(), moduleIdentifier.getName(), moduleIdentifier.getRevision().get()); } private  NetconfMessageUtil(); static String buildRpcReplyOk(String messageId); static String getParentXmlns(Document request); static Node getFirstNode(Document document, String tagName); static String getMessageIdFromRpcDocument(Document request); static Document getDocumentFromResponse(NetConfResponse netConfResponse); static String getTypeOfNetconfRequest(Document document); static void appendNewElement(Document document, Element parent, String tagName, String value); static ModuleIdentifier buildModuleIdentifier(String name, String namespace, String revision); static String buildModuleCapability(ModuleIdentifier moduleIdentifier);  }
@Test public void buildModuleCapabilityTest() throws Exception { ModuleIdentifier moduleIdentifier = NetconfMessageUtil.buildModuleIdentifier("network-manager", AggregatorMessage.NS_OBBAA_NETWORK_MANAGER,"2020-02-19"); String result = NetconfMessageUtil.buildModuleCapability(moduleIdentifier); assertFalse(result.isEmpty()); assertEquals("urn:bbf:yang:obbaa:network-manager?module=network-manager&revision=2020-02-19", result); }