@Test
public void testCopyConfig() throws NetconfMessageBuilderException, ExecutionException {

    NetConfResponse getResponse = new NetConfResponse();
    getResponse.addDataContent(DocumentUtils.stringToDocument("<if:interfaces\n" +
            "                            xmlns:if=\"urn:ietf:params:xml:ns:yang:ietf-interfaces\">\n" +
            "    <if:interface>\n" +
            "        <if:name>xdsl-line:1/1/1/new</if:name>\n" +
            "        <if:type xmlns:bbfift=\"urn:broadband-forum-org:yang:bbf-if-type\">bbfift:xdsl</if" +
            ":type>\n" +
            "    </if:interface>\n" +
            "</if:interfaces>").getDocumentElement());
    String expected = "<rpc xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n" +
            "  <copy-config>\n" +
            "    <target>\n" +
            "      <running/>\n" +
            "    </target>\n" +
            "    <source>\n" +
            "      <config>\n" +
            "        <if:interfaces xmlns:if=\"urn:ietf:params:xml:ns:yang:ietf-interfaces\">\n" +
            "    <if:interface>\n" +
            "        <if:name>xdsl-line:1/1/1/new</if:name>\n" +
            "        <if:type xmlns:bbfift=\"urn:broadband-forum-org:yang:bbf-if-type\">bbfift:xdsl</if:type>\n" +
            "    </if:interface>\n" +
            "</if:interfaces>\n" +
            "      </config>\n" +
            "    </source>\n" +
            "  </copy-config>\n" +
            "</rpc>";
    if (System.getProperty("os.name").startsWith("Windows")) {
        expected = "<rpc xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\r\n" +
                "  <copy-config>\r\n" +
                "    <target>\r\n" +
                "      <running/>\r\n" +
                "    </target>\r\n" +
                "    <source>\r\n" +
                "      <config>\r\n" +
                "        <if:interfaces xmlns:if=\"urn:ietf:params:xml:ns:yang:ietf-interfaces\">\r\n" +
                "    <if:interface>\r\n" +
                "        <if:name>xdsl-line:1/1/1/new</if:name>\r\n" +
                "        <if:type xmlns:bbfift=\"urn:broadband-forum-org:yang:bbf-if-type\">bbfift:xdsl</if:type>\r\n" +
                "    </if:interface>\r\n" +
                "</if:interfaces>\r\n" +
                "      </config>\r\n" +
                "    </source>\r\n" +
                "  </copy-config>\r\n" +
                "</rpc>";
    }
    Pair<AbstractNetconfRequest, Future<NetConfResponse>> copyConfigResponse = m_deviceInterface.forceAlign(m_device, getResponse);
    verify(m_ncm).executeNetconf(anyString(), any(CopyConfigRequest.class));
    assertEquals(expected, copyConfigResponse.getFirst().requestToString().trim());
}