@Test
public void testCreationOfDeviceWithAvailableAdapter() {

    ArgumentCaptor<DeviceAdapterId> adapter = ArgumentCaptor.forClass(DeviceAdapterId.class);
    EditContainmentNode deviceEditNode = new EditContainmentNode(DEVICE_MANAGEMENT_QNAME, EditConfigOperations.MERGE);
    deviceEditNode.addLeafChangeNode(TYPE_QNAME, new GenericConfigAttribute(TYPE, NS, "TYPE1"));
    deviceEditNode.addLeafChangeNode(INTERFACE_VERSION_QNAME, new GenericConfigAttribute(INTERFACE_VERSION, NS, "1.0"));
    deviceEditNode.addLeafChangeNode(VENDOR_QNAME, new GenericConfigAttribute(VENDOR, NS, "VENDOR1"));
    deviceEditNode.addLeafChangeNode(MODEL_QNAME, new GenericConfigAttribute(MODEL, NS, "MODEL1"));
    EditContext editContext = new EditContext(deviceEditNode, null, ERROR_ON_ROLLBACK, null);
    m_deviceConfigInterceptor.interceptEditConfig(m_modelNode, editContext);
    verify(m_adapterManager).getDeviceAdapter(adapter.capture());
}