UndeployAdapterRpc extends NetconfRpcMessage { public UndeployAdapter getUndeployAdapter() { return undeployAdapter; } private  UndeployAdapterRpc(String netconfMessage); static UndeployAdapterRpc getInstance(String netconfMessage); UndeployAdapter getUndeployAdapter();  }
@Test public void getUndeployAdapterTest() throws DispatchException { String undeployAction = "<rpc xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\" message-id=\"10101\">\n" + " <action xmlns=\"urn:ietf:params:xml:ns:yang:1\">\n" + " <undeploy-adapter xmlns=\"urn:bbf:yang:obbaa:device-adapters\">\n" + " <undeploy>\n" + " <adapter-archive>adapterExample.zip</adapter-archive>\n" + " </undeploy>\n" + " </undeploy-adapter>\n" + " </action>\n" + "</rpc>"; UndeployAdapterRpc undeployAdapterRpc = UndeployAdapterRpc.getInstance(undeployAction); assertNotNull(undeployAdapterRpc.getUndeployAdapter().getUndeploy()); assertEquals("adapterExample.zip", undeployAdapterRpc.getUndeployAdapter().getUndeploy().getAdapterArchive()); }