// Path: src/main/java/com/jfcorugedo/rserver/common/collection/CollectionUtils.java
// @SafeVarargs
// public static <T> List<T> newList(T... values) {
// 	List<T> arrayList = new ArrayList<>(values.length);
// 	for(T element : values) {
// 		arrayList.add(element);
// 	}
// 		
// 	return arrayList;
// }
// 
// Path: src/main/java/com/jfcorugedo/rserver/engine/REngineProviderService.java
// public interface REngineProviderService {
// 
// 	/**
// 	 * Executes R block function against a list of values.
// 	 * 
// 	 * @see https://cran.r-project.org/web/packages/blockTools/blockTools.pdf
// 	 * @param ids Identifiers associated to each value
// 	 * @param values Values used to perform the matching
// 	 * @return An object containing all the IDs grouped in pairs based on the distance of each one
// 	 */
// 	REXP blockFunction(REXPInteger ids, REXPDouble... values);
// 
// 	/**
// 	 * Executes R block function against a list of discrete (non-numeric) values.
// 	 * 
// 	 * @see https://cran.r-project.org/web/packages/blockTools/blockTools.pdf
// 	 * @param ids Identifiers associated to each value
// 	 * @param values Values that must be grouped into pairs
// 	 * @return An object containing all the IDs grouped in pairs based on the distance of eachone
// 	 */
// 	REXP blockDiscreteFunction(REXPInteger ids, REXPString... values);
// 	
// 	/**
// 	 * Executes R block function against a list of discrete (non-numeric) and continuous values.
// 	 * 
// 	 * @see https://cran.r-project.org/web/packages/blockTools/blockTools.pdf
// 	 * @param ids Identifiers associated to each value
// 	 * @param discreteValues List of discrete values that must be used to group elements
// 	 * @param continuousValues List of continuous values that must be used to group elements
// 	 * @return An object containing all the IDs grouped in pairs based on the distance of eachone
// 	 */
// 	REXP blockGeneralFunction(REXPInteger ids, List<REXPString> discreteValues, List<REXPDouble> continuousValues);
// 
// 	/**
// 	 * Calculates the sqare root of a given number
// 	 * @param number
// 	 * @return
// 	 */
// 	double sqrt(double number);
// 	
// 	/**
// 	 * Perform a two-sample Kolmogorov-Smirnov test.
// 	 * 
// 	 * @param x A numeric vector of data values.
// 	 * @param y A numeric vector of data values.
// 	 * @return p-value associated with the null hypothesis that x and y come from the same distribution (are equivalent)
// 	 */
// 	double ksTest(REXPDouble x, REXPDouble y);
// }


import static com.jfcorugedo.rserver.common.collection.CollectionUtils.newList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyListOf;
import static org.mockito.Matchers.anyVararg;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.List;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.rosuda.REngine.REXP;
import org.rosuda.REngine.REXPDouble;
import org.rosuda.REngine.REXPGenericVector;
import org.rosuda.REngine.REXPInteger;
import org.rosuda.REngine.REXPString;
import org.rosuda.REngine.RList;
import com.jfcorugedo.rserver.engine.REngineProviderService;
package com.jfcorugedo.rserver.service;





public class RServiceImplTest {

	@Rule
	public MockitoRule rule = MockitoJUnit.rule();
	
	@Mock
// Path: src/main/java/com/jfcorugedo/rserver/common/collection/CollectionUtils.java
// @SafeVarargs
// public static <T> List<T> newList(T... values) {
// 	List<T> arrayList = new ArrayList<>(values.length);
// 	for(T element : values) {
// 		arrayList.add(element);
// 	}
// 		
// 	return arrayList;
// }
// 
// Path: src/main/java/com/jfcorugedo/rserver/engine/REngineProviderService.java
// public interface REngineProviderService {
// 
// 	/**
// 	 * Executes R block function against a list of values.
// 	 * 
// 	 * @see https://cran.r-project.org/web/packages/blockTools/blockTools.pdf
// 	 * @param ids Identifiers associated to each value
// 	 * @param values Values used to perform the matching
// 	 * @return An object containing all the IDs grouped in pairs based on the distance of each one
// 	 */
// 	REXP blockFunction(REXPInteger ids, REXPDouble... values);
// 
// 	/**
// 	 * Executes R block function against a list of discrete (non-numeric) values.
// 	 * 
// 	 * @see https://cran.r-project.org/web/packages/blockTools/blockTools.pdf
// 	 * @param ids Identifiers associated to each value
// 	 * @param values Values that must be grouped into pairs
// 	 * @return An object containing all the IDs grouped in pairs based on the distance of eachone
// 	 */
// 	REXP blockDiscreteFunction(REXPInteger ids, REXPString... values);
// 	
// 	/**
// 	 * Executes R block function against a list of discrete (non-numeric) and continuous values.
// 	 * 
// 	 * @see https://cran.r-project.org/web/packages/blockTools/blockTools.pdf
// 	 * @param ids Identifiers associated to each value
// 	 * @param discreteValues List of discrete values that must be used to group elements
// 	 * @param continuousValues List of continuous values that must be used to group elements
// 	 * @return An object containing all the IDs grouped in pairs based on the distance of eachone
// 	 */
// 	REXP blockGeneralFunction(REXPInteger ids, List<REXPString> discreteValues, List<REXPDouble> continuousValues);
// 
// 	/**
// 	 * Calculates the sqare root of a given number
// 	 * @param number
// 	 * @return
// 	 */
// 	double sqrt(double number);
// 	
// 	/**
// 	 * Perform a two-sample Kolmogorov-Smirnov test.
// 	 * 
// 	 * @param x A numeric vector of data values.
// 	 * @param y A numeric vector of data values.
// 	 * @return p-value associated with the null hypothesis that x and y come from the same distribution (are equivalent)
// 	 */
// 	double ksTest(REXPDouble x, REXPDouble y);
// }


// Path: src/test/java/com/jfcorugedo/rserver/service/RServiceImplTest.java
import static com.jfcorugedo.rserver.common.collection.CollectionUtils.newList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyListOf;
import static org.mockito.Matchers.anyVararg;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.List;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.rosuda.REngine.REXP;
import org.rosuda.REngine.REXPDouble;
import org.rosuda.REngine.REXPGenericVector;
import org.rosuda.REngine.REXPInteger;
import org.rosuda.REngine.REXPString;
import org.rosuda.REngine.RList;
import com.jfcorugedo.rserver.engine.REngineProviderService;

package com.jfcorugedo.rserver.service;





public class RServiceImplTest {

	@Rule
	public MockitoRule rule = MockitoJUnit.rule();
	
	@Mock
	private REngineProviderService engineProvider;