@Test
public void testCreateInstanceWithLabel() {

	// Given
	InstanceCreator<Boolean> instanceCreator = new InstanceCreator<Boolean>();
	TridentTuple tuple = mock(TridentTuple.class);
	Boolean expectedLabel = true;
	double f1 = 0.53;
	double f2 = 0.65;
	when(tuple.size()).thenReturn(3);
	when(tuple.get(0)).thenReturn(expectedLabel);
	when(tuple.getDouble(1)).thenReturn(f1);
	when(tuple.getDouble(2)).thenReturn(f2);
	// When
	Instance<Boolean> actualInstance = instanceCreator.createInstance(tuple);
	// Then
	Instance<Boolean> expectedInstance = new Instance<Boolean>(expectedLabel, new double[] { f1, f2 });
	assertEquals(expectedInstance, actualInstance);
}