@Test
public void testDisableGenericTypes() {

	ExecutionConfig conf = new ExecutionConfig();
	TypeInformation<Object> typeInfo = new GenericTypeInfo<Object>(Object.class);
	// by default, generic types are supported
	TypeSerializer<Object> serializer = typeInfo.createSerializer(conf);
	assertTrue(serializer instanceof KryoSerializer);
	// expect an exception when generic types are disabled
	conf.disableGenericTypes();
	try {
		typeInfo.createSerializer(conf);
		fail("should have failed with an exception");
	}
	catch (UnsupportedOperationException e) {
		// expected
	}
}