@Test
public void testNcSessionMgrIsContactedToRetrieveStateValues()
        throws GetAttributeException, ExecutionException, NetconfMessageBuilderException, IOException,
        SAXException {

    Map<ModelNodeId, Pair<List<QName>, List<FilterNode>>> attributes = getAttributes();
    m_deviceSubsystem.retrieveStateAttributes(attributes, new NetconfQueryParams(UNBOUNDED, true));
    verify(m_deviceInterface).get(eq(m_device), m_requestCaptor.capture());
    String expectedGetRequest = "<rpc xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n" +
            "  <get>\n" +
            "    <filter type=\"subtree\">\n" +
            "      <interfaces-state xmlns=\"urn:ietf:ns\">\n" +
            "        <test1>\n" +
            "          <containment-node xmlns=\"urn:containment:ns\">\n" +
            "            <match-node xmlns=\"urn:match:ns\">match-value</match-node>\n" +
            "            <inner-select-node xmlns=\"urn:inner:select:ns\"/>\n" +
            "          </containment-node>\n" +
            "          <select-node xmlns=\"urn:select:ns\"/>\n" +
            "        </test1>\n" +
            "        <test3>\n" +
            "          <leaf-match xmlns=\"urn:leafmatch:ns\">leaf-match-value</leaf-match>\n" +
            "        </test3>\n" +
            "        <leaf1/>\n" +
            "        <leaf2/>\n" +
            "      </interfaces-state>\n" +
            "    </filter>\n" +
            "  </get>\n" +
            "</rpc>";
      assertEquals(expectedGetRequest, m_requestCaptor.getValue().requestToString().trim());
    TestUtil.assertXMLEquals(DocumentUtils.stringToDocument(expectedGetRequest).getDocumentElement(),
            DocumentUtils.stringToDocument(m_requestCaptor.getValue().requestToString().trim()).getDocumentElement());
}