@Test
public void retrieveStateAttributesOfDeviceB() throws Exception {

    Map<ModelNodeId, Pair<List<QName>, List<FilterNode>>> mapAttributes = new HashMap<>();
    Document deviceStateFilter = DocumentUtils.loadXmlDocument(DeviceManagementSubsystemTest.class.getResourceAsStream("/filter-connection-state-request.xml"));
    mapAttributes.put(DEVICE_B_ID_TEMPLATE, new Pair<>(Collections.emptyList(), Arrays.asList(getFilterNode(deviceStateFilter))));
    Map<ModelNodeId, List<Element>> stateInfo = m_deviceManagementSubsystem.retrieveStateAttributes(mapAttributes);
    assertEquals(1, stateInfo.size());
    List<Element> deviceBState = stateInfo.get(DEVICE_B_ID_TEMPLATE);
    assertEquals(1, deviceBState.size());
    Document deviceBStatedocument = getDeviceStateDocumentWithConnectionStateFilter(DEVICE_B);
    TestUtil.assertXMLEquals(deviceBStatedocument.getDocumentElement(), deviceBState.get(0));
}