NetconfRpcMessage extends NetconfPayload { public static Rpc getRpc(String netconfMessage) throws JAXBException { if (netconfMessage.contains(NetconfProtocol.VERSION_1_1)) { return JaxbUtils.unmarshal(netconfMessage, RpcV11.class); } return JaxbUtils.unmarshal(netconfMessage, RpcV10.class); } private  NetconfRpcMessage();  NetconfRpcMessage(String netconfMessage); static NetconfRpcMessage getInstance(String netconfRequest); static List<Document> getRpcPayloads(Rpc rpc); static List<Object> getRpcPayloadObjects(Rpc rpc); static Rpc getRpc(String netconfMessage); Rpc getRpc(); String getOriginalMessage(); String buildRpcReplyOk(); String buildRpcReplyError(String error);  }
@Test public void getRpcTest() throws Exception { String request = "<rpc message-id=\"3\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n" + " <get>\n" + " <filter type=\"subtree\">\n" + " <schema-mounts xmlns=\"urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount\">\n" + " <mount-point/>\n" + " </schema-mounts>\n" + " </filter>\n" + " </get>\n" + "</rpc>"; NetconfRpcMessage netconfRpcMessage = new NetconfRpcMessage(request); assertTrue(netconfRpcMessage.getRpc().getGet() != null); }