@Test
public void testSplitRowingContinuousMode() throws Exception {

	
	
	test = new TestRoboStroke(v("dataInput"));
       
	final int strokesVal = v("strokes", Integer.class);
	
	BusEventListener listener = new BusEventListener() {
		
		@SuppressWarnings("incomplete-switch")
		@Override
		public void onBusEvent(DataRecord event) {
			switch (event.type) {
			case ROWING_COUNT:
				if ((Integer)event.data == strokesVal) {
					test.roboStroke.getParameters().setParam(ParamKeys.PARAM_ROWING_MODE.getId(), RowingSplitMode.AUTO + "");
				}
				break;
			}
		}
	};
	
	test.bus.addBusListener(listener);
	DataRecord event;
	
	try {							
		
		event = splitRowing(RowingSplitMode.CONTINUOUS, false);
	
	} finally {
		test.bus.removeBusListener(listener);
	}
	
	/* ROWING_STOP 169103868297216 169098851909632 114.224663 36272340992 37000 12 */
	Object[] data = (Object[]) event.data;
	
	float distance = (Float)data[1];
	long splitTime = (Long) data[2];
	long travelTime = (Long) data[3];
	int strokes = (Integer) data[4];
	
	Assert.assertEquals(v("splitTime", Double.class), splitTime / 1000000000.0, 0.5);
	Assert.assertEquals(v("distance", Double.class), distance, 1);
	Assert.assertEquals(v("travelTime", Double.class), travelTime / 1000.0, 1);
	Assert.assertEquals((double)strokesVal, strokes, 1);
	
}