@Test
public void retrieveStateAttributesOfDeviceA_DeviceB_WhenAdapterNotdeployed() throws Exception {

    when(m_adapterManager.getAdapterContext(any())).thenReturn(null);
    Map<ModelNodeId, Pair<List<QName>, List<FilterNode>>> mapAttributes = new HashMap<>();
    Document deviceStateFilter = DocumentUtils.loadXmlDocument(DeviceManagementSubsystemTest.class.getResourceAsStream("/filter-device-state-request.xml"));
    mapAttributes.put(DEVICE_A_ID_TEMPLATE, new Pair<>(Collections.emptyList(), Arrays.asList(getFilterNode(deviceStateFilter))));
    mapAttributes.put(DEVICE_B_ID_TEMPLATE, new Pair<>(Collections.emptyList(), Arrays.asList(getFilterNode(deviceStateFilter))));
    Map<ModelNodeId, List<Element>> stateInfo = m_deviceManagementSubsystem.retrieveStateAttributes(mapAttributes);
    assertEquals(2, stateInfo.size());
    List<Element> deviceAState = stateInfo.get(DEVICE_A_ID_TEMPLATE);
    assertEquals(1, deviceAState.size());
    List<Element> deviceBState = stateInfo.get(DEVICE_B_ID_TEMPLATE);
    assertEquals(1, deviceBState.size());
    String expectedDeviceState = "<device-state xmlns=\"urn:bbf:yang:obbaa:network-manager\"/>";
    assertEquals(expectedDeviceState, DocumentUtils.documentToPrettyString(deviceAState.get(0)).trim());
    assertEquals(expectedDeviceState, DocumentUtils.documentToPrettyString(deviceBState.get(0)).trim());
}