// Path: wso2-synapse-unit-test-plugin/src/main/java/org/wso2/synapse/unittest/Constants.java
// static final String RELATIVE_PREVIOUS = "..";


import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import static org.wso2.synapse.unittest.Constants.RELATIVE_PREVIOUS;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.util.AXIOMUtil;
import org.apache.commons.io.FileUtils;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugin.logging.SystemStreamLog;
import org.codehaus.plexus.util.Base64;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
            //Read mock-services data
            processMockServicesData(mockServicesNode);

            return importedXMLFile.toString();

        } catch (IOException | XMLStreamException e) {
            getLog().error("Artifact data reading failed ", e);
        }

        return null;
    }

    /**
     * Method of processing test-artifact data.
     * Reads artifacts from user defined file and append it to the artifact node
     *
     * @param artifactsNode artifact data contain node
     */
    private static void processTestArtifactData(OMElement artifactsNode) throws IOException, XMLStreamException {
        //Read artifacts from SynapseTestCase file
        QName qualifiedTestArtifact = new QName("", Constants.TEST_ARTIFACT, "");
        OMElement testArtifactNode = artifactsNode.getFirstChildWithName(qualifiedTestArtifact);

        //Read test-artifact data
        QName qualifiedArtifact = new QName("", Constants.ARTIFACT, "");
        OMElement testArtifactFileNode = testArtifactNode.getFirstChildWithName(qualifiedArtifact);

        String testArtifactFileAsString;
        if (!testArtifactFileNode.getText().isEmpty()) {
            String testArtifactFilePath = testArtifactFileNode.getText();
// Path: wso2-synapse-unit-test-plugin/src/main/java/org/wso2/synapse/unittest/Constants.java
// static final String RELATIVE_PREVIOUS = "..";


// Path: wso2-synapse-unit-test-plugin/src/main/java/org/wso2/synapse/unittest/SynapseTestCaseFileReader.java
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import static org.wso2.synapse.unittest.Constants.RELATIVE_PREVIOUS;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.util.AXIOMUtil;
import org.apache.commons.io.FileUtils;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugin.logging.SystemStreamLog;
import org.codehaus.plexus.util.Base64;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;

            //Read mock-services data
            processMockServicesData(mockServicesNode);

            return importedXMLFile.toString();

        } catch (IOException | XMLStreamException e) {
            getLog().error("Artifact data reading failed ", e);
        }

        return null;
    }

    /**
     * Method of processing test-artifact data.
     * Reads artifacts from user defined file and append it to the artifact node
     *
     * @param artifactsNode artifact data contain node
     */
    private static void processTestArtifactData(OMElement artifactsNode) throws IOException, XMLStreamException {
        //Read artifacts from SynapseTestCase file
        QName qualifiedTestArtifact = new QName("", Constants.TEST_ARTIFACT, "");
        OMElement testArtifactNode = artifactsNode.getFirstChildWithName(qualifiedTestArtifact);

        //Read test-artifact data
        QName qualifiedArtifact = new QName("", Constants.ARTIFACT, "");
        OMElement testArtifactFileNode = testArtifactNode.getFirstChildWithName(qualifiedArtifact);

        String testArtifactFileAsString;
        if (!testArtifactFileNode.getText().isEmpty()) {
            String testArtifactFilePath = testArtifactFileNode.getText();
            File testArtifactFile = new File(RELATIVE_PREVIOUS + File.separator +  testArtifactFilePath);