@Test
public void testDeviceAddedWithCorrectDefaultXml() throws ExecutionException, IOException, NetconfMessageBuilderException {

    String editConfigRequestString = "<rpc message-id=\"e1\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">" + System.lineSeparator() +
            "  <edit-config>" + System.lineSeparator() +
            "    <target>" + System.lineSeparator() +
            "      <running/>" + System.lineSeparator() +
            "    </target>" + System.lineSeparator() +
            "    <default-operation>merge</default-operation>" + System.lineSeparator() +
            "    <test-option>set</test-option>" + System.lineSeparator() +
            "    <error-option>stop-on-error</error-option>" + System.lineSeparator() +
            "    <config>" + System.lineSeparator() +
            "      <if:interfaces xmlns=\"urn:bbf:yang:obbaa:network-manager\" xmlns:if=\"urn:ietf:params:xml:ns:yang:ietf-interfaces\">" + System.lineSeparator() +
            "                <if:interface xmlns:xc=\"urn:ietf:params:xml:ns:netconf:base:1.0\" xc:operation=\"create\">" + System.lineSeparator() +
            "                    <if:name>Interface</if:name>" + System.lineSeparator() +
            "                    <if:type xmlns:ianaift=\"urn:ietf:params:xml:ns:yang:iana-if-type\">ianaift:fastdsl</if:type>" + System.lineSeparator() +
            "                    <if:description>InterfaceDescription</if:description>" + System.lineSeparator() +
            "                </if:interface>" + System.lineSeparator() +
            "            </if:interfaces>" + System.lineSeparator() +
            "    </config>" + System.lineSeparator() +
            "  </edit-config>" + System.lineSeparator() +
            "</rpc>" + System.lineSeparator();
    EditConfigRequest request = DocumentToPojoTransformer.getEditConfig(DocumentUtils.stringToDocument(editConfigRequestString));
    when(m_adapterManager.getEditRequestForAdapter(any())).thenReturn(request);
    //when the mechanism is push, there should be interaction with pmaregistry with the edit-config of default config retuned by the adapter-manager
    m_defaultConfigService.deviceAdded(m_device.getDeviceName());
    verify(m_pmaRegistry).executeNC(m_device.getDeviceName(), editConfigRequestString);
    // when the mechanism is pull, there should be no interaction with the pmaregistry
    m_deviceMgmt.setPushPmaConfigurationToDevice("false");
    m_device.setDeviceManagement(m_deviceMgmt);
    m_defaultConfigService.deviceAdded(m_device.getDeviceName());
    //only one interaction from push mechanism
    verify(m_pmaRegistry).executeNC(m_device.getDeviceName(), editConfigRequestString);
}