@Test
public void should_classify_instance_using_classifier() {

	// Given
	Double expectedPrediction1 = 2.5;
	Double expectedPrediction2 = 12.8;
	String regressorName = "TestLearner";
	RegressionQuery query = new RegressionQuery(regressorName);
	double[] features1 = new double[10];
	double[] features2 = new double[10];
	TridentTuple tuple1 = createMockedInstanceTuple(features1);
	TridentTuple tuple2 = createMockedInstanceTuple(features2);
	List<TridentTuple> tuples = Arrays.asList(tuple1, tuple2);
	Regressor expectedRegressor = mock(Regressor.class);
	given(expectedRegressor.predict(same(features1))).willReturn(expectedPrediction1);
	given(expectedRegressor.predict(same(features2))).willReturn(expectedPrediction2);
	List<List<Object>> expectedKeys = asList(asList((Object) regressorName));
	MapState<Regressor> state = mock(MapState.class);
	given(state.multiGet(expectedKeys)).willReturn(Arrays.asList(expectedRegressor));
	// When
	List<Double> actualPredictions = query.batchRetrieve(state, tuples);
	assertEquals(2, actualPredictions.size());
	assertEquals(expectedPrediction1, actualPredictions.get(0));
	assertEquals(expectedPrediction2, actualPredictions.get(1));
}