@Test
public void retrieveStateAttributesNewDevicesAndDeviceAdapters() throws Exception {

    Map<ModelNodeId, Pair<List<QName>, List<FilterNode>>> mapAttributes = new HashMap<>();
    Document filterNewDevicesWithDuid = DocumentUtils.loadXmlDocument(DeviceManagementSubsystemTest.class.getResourceAsStream("/filter-new-devices-with-duid-request.xml"));
    Document filterDeviceAdapterWithType = DocumentUtils.loadXmlDocument(DeviceManagementSubsystemTest.class.getResourceAsStream("/filter-device-adapter-with-type-request.xml"));
    mapAttributes.put(NETWORK_MANAGER_ID_TEMPLATE, new Pair<>(Collections.emptyList(), Arrays.asList(getFilterNode(filterNewDevicesWithDuid), getFilterNode(filterDeviceAdapterWithType))));
    Map<ModelNodeId, List<Element>> stateInfo = m_deviceManagementSubsystem.retrieveStateAttributes(mapAttributes);
    assertEquals(1, stateInfo.size());
    List<Element> newDeviceAndAdapter = stateInfo.get(NETWORK_MANAGER_ID_TEMPLATE);
    assertEquals(2, newDeviceAndAdapter.size());
    TestUtil.assertXMLEquals(DocumentUtils.loadXmlDocument(DeviceManagementSubsystemTest.class.getResourceAsStream("/filter-new-devices-with-duid-response.xml")).getDocumentElement(), newDeviceAndAdapter.get(0));
    TestUtil.assertXMLEquals(DocumentUtils.loadXmlDocument(DeviceManagementSubsystemTest.class.getResourceAsStream("/device-adapters-response.xml")).getDocumentElement(), newDeviceAndAdapter.get(1));
}