+ @Test
+ public void testLockRequestBaseSchemaNotPresent() throws Exception {
+ final SchemaContext partialSchema = getSchema(false);
+ final NetconfMessageTransformer transformer = getTransformer(partialSchema);
+ final NetconfMessage netconfMessage = transformer.toRpcRequest(toPath(NETCONF_LOCK_QNAME),
+ NetconfBaseOps.getLockContent(NETCONF_CANDIDATE_QNAME));
+
+ assertThat(XmlUtil.toString(netconfMessage.getDocument()), CoreMatchers.containsString("<lock"));
+ }
+
+ @Test
+ public void tesLockSchemaRequest() throws Exception {
+ final SchemaContext partialSchema = getSchema(false);
+ final NetconfMessageTransformer transformer = getTransformer(partialSchema);
+ final String result = "<rpc-reply xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"><ok/></rpc-reply>";
+
+ transformer.toRpcResult(new NetconfMessage(XmlUtil.readXmlToDocument(result)), toPath(NETCONF_LOCK_QNAME));
+ }
+