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

@Test
public void testBasicArray() {
	// use getCoGroupReturnTypes()
	RichCoGroupFunction<?, ?, ?> function = new RichCoGroupFunction<String[], String[], String[]>() {
		private static final long serialVersionUID = 1L;
		@Override
		public void coGroup(Iterable<String[]> first, Iterable<String[]> second, Collector<String[]> out) throws Exception {
			// nothing to do
		}
	};
	TypeInformation<?> ti = TypeExtractor.getCoGroupReturnTypes(function, (TypeInformation) TypeInfoParser.parse("String[]"), (TypeInformation) TypeInfoParser.parse("String[]"));
	Assert.assertFalse(ti.isBasicType());
	Assert.assertFalse(ti.isTupleType());
	
	// Due to a Java 6 bug the classification can be slightly wrong
	Assert.assertTrue(ti instanceof BasicArrayTypeInfo<?,?> || ti instanceof ObjectArrayTypeInfo<?,?>);
	
	if(ti instanceof BasicArrayTypeInfo<?,?>) {
		Assert.assertEquals(BasicArrayTypeInfo.STRING_ARRAY_TYPE_INFO, ti);
	}
	else {
		Assert.assertEquals(BasicTypeInfo.STRING_TYPE_INFO, ((ObjectArrayTypeInfo<?,?>) ti).getComponentInfo());
	}		
}