@Test
public void testFunctionInputInOutputMultipleTimes2() {

	RichMapFunction<Tuple2<Float, Float>, ?> function = new FieldDuplicator<Tuple2<Float, Float>>();
	TypeInformation<?> ti = TypeExtractor.getMapReturnTypes(function, new TupleTypeInfo<Tuple2<Float, Float>>(
			BasicTypeInfo.FLOAT_TYPE_INFO, BasicTypeInfo.FLOAT_TYPE_INFO));
	// should be
	// Tuple2<Tuple2<Float, Float>, Tuple2<Float, Float>>
	Assert.assertTrue(ti.isTupleType());
	Assert.assertEquals(2, ti.getArity());
	TupleTypeInfo<?> tti = (TupleTypeInfo<?>) ti;
	// 2nd nested level	
	Assert.assertTrue(tti.getTypeAt(0).isTupleType());
	TupleTypeInfo<?> tti2 = (TupleTypeInfo<?>) tti.getTypeAt(0);
	Assert.assertEquals(BasicTypeInfo.FLOAT_TYPE_INFO, tti2.getTypeAt(0));
	Assert.assertEquals(BasicTypeInfo.FLOAT_TYPE_INFO, tti2.getTypeAt(1));
	Assert.assertTrue(tti.getTypeAt(0).isTupleType());
	TupleTypeInfo<?> tti3 = (TupleTypeInfo<?>) tti.getTypeAt(1);
	Assert.assertEquals(BasicTypeInfo.FLOAT_TYPE_INFO, tti3.getTypeAt(0));
	Assert.assertEquals(BasicTypeInfo.FLOAT_TYPE_INFO, tti3.getTypeAt(1));
}