@SuppressWarnings({ "unchecked", "rawtypes" })

@Test
public void testChainedGenericsNotInSuperclass() {
	// use TypeExtractor
	RichMapFunction<?, ?> function = new RichMapFunction<ChainedTwo<Integer>, ChainedTwo<Integer>>() {
		private static final long serialVersionUID = 1L;
		@Override
		public ChainedTwo<Integer> map(ChainedTwo<Integer> value) throws Exception {
			return null;
		}			
	};
	TypeInformation<?> ti = TypeExtractor.getMapReturnTypes(function, (TypeInformation) TypeInfoParser.parse("Tuple3<String, Long, Integer>"));
	Assert.assertTrue(ti.isTupleType());
	Assert.assertEquals(3, ti.getArity());
	
	TupleTypeInfo<?> tti = (TupleTypeInfo<?>) ti;
	Assert.assertEquals(ChainedTwo.class, tti.getTypeClass());
	
	Assert.assertEquals(BasicTypeInfo.STRING_TYPE_INFO, tti.getTypeAt(0));
	Assert.assertEquals(BasicTypeInfo.LONG_TYPE_INFO, tti.getTypeAt(1));
	Assert.assertEquals(BasicTypeInfo.INT_TYPE_INFO, tti.getTypeAt(2));
}