<commit_before>package org.mule.examples;

import static org.junit.Assert.assertEquals;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import org.junit.BeforeClass;
import org.junit.Test;
import org.mule.api.MuleMessage;
import org.mule.module.client.MuleClient;
import org.mule.tck.junit4.FunctionalTestCase;

import com.opensymphony.util.FileUtils;

import de.schlichtherle.io.FileInputStream;

public class SalesforceIdRetrievalIT extends FunctionalTestCase {

	private static final String PARAMS = "?object=user&searchKey=name&searchValue=mule";
	private static final String TEST_DIR = "./src/test/resources";
	private static String REPLY;
	
	@BeforeClass
	public static void init(){
		REPLY = FileUtils.readFile(new File(TEST_DIR + "/reply.txt")).replace("\n", "");
		
		Properties props = new Properties();
		try {
			props.load(new FileInputStream(TEST_DIR + "/mule.test.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		System.setProperty("sfdc.username", props.getProperty("sfdc.username"));
    	System.setProperty("sfdc.securityToken", props.getProperty("sfdc.securityToken"));
    	System.setProperty("sfdc.password", props.getProperty("sfdc.password"));

	}
	
	@Override
    protected String getConfigResources()
    {
        return "salesforce-id-retrieval.xml";
    }
	
	@Test
	public void testGetData() throws Exception {
		MuleClient client = new MuleClient(muleContext);
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("http.method", "GET");
        MuleMessage result = client.send("http://localhost:8081/" + PARAMS, "", props);
        assertEquals(result.getPayloadAsString(), REPLY);
	}
}
<commit_msg>SIT-871, fixed imports<commit_after>package org.mule.examples;

import static org.junit.Assert.assertEquals;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import org.apache.commons.io.FileUtils;
import org.junit.BeforeClass;
import org.junit.Test;
import org.mule.api.MuleMessage;
import org.mule.module.client.MuleClient;
import org.mule.tck.junit4.FunctionalTestCase;

public class SalesforceIdRetrievalIT extends FunctionalTestCase {

	private static final String PARAMS = "?object=user&searchKey=name&searchValue=mule";
	private static final String TEST_DIR = "./src/test/resources";
	private static String REPLY;
	
	@BeforeClass
	public static void init() throws IOException{
		REPLY = FileUtils.readFileToString(new File(TEST_DIR + "/reply.txt")).replace("\n", "");
		
		Properties props = new Properties();
		props.load(new FileInputStream(TEST_DIR + "/mule.test.properties"));
		
		System.setProperty("sfdc.username", props.getProperty("sfdc.username"));
    	System.setProperty("sfdc.securityToken", props.getProperty("sfdc.securityToken"));
    	System.setProperty("sfdc.password", props.getProperty("sfdc.password"));

	}
	
	@Override
    protected String getConfigResources()
    {
        return "salesforce-id-retrieval.xml";
    }
	
	@Test
	public void testGetData() throws Exception {
		MuleClient client = new MuleClient(muleContext);
        Map<String, Object> props = new HashMap<String, Object>();
        props.put("http.method", "GET");
        MuleMessage result = client.send("http://localhost:8081/" + PARAMS, "", props);
        assertEquals(result.getPayloadAsString(), REPLY);
	}
}

{'fraction_non_alphanumeric': 0.13054680790151732, 'fraction_numerical': 0.0037217291726309764, 'mean_word_length': 4.690553745928339, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1894849', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1055, 'n_words': 215}