### Question:
ExecutionConfig implements Serializable, Archiveable<ArchivedExecutionConfig> { public void disableGenericTypes() { disableGenericTypes = true; }  ExecutionConfig enableClosureCleaner(); ExecutionConfig disableClosureCleaner(); boolean isClosureCleanerEnabled(); @PublicEvolving ExecutionConfig setAutoWatermarkInterval(long interval); @PublicEvolving long getAutoWatermarkInterval(); @PublicEvolving ExecutionConfig setLatencyTrackingInterval(long interval); @PublicEvolving long getLatencyTrackingInterval(); @PublicEvolving boolean isLatencyTrackingEnabled(); int getParallelism(); ExecutionConfig setParallelism(int parallelism); @PublicEvolving int getMaxParallelism(); @PublicEvolving void setMaxParallelism(int maxParallelism); long getTaskCancellationInterval(); ExecutionConfig setTaskCancellationInterval(long interval); @PublicEvolving long getTaskCancellationTimeout(); @PublicEvolving ExecutionConfig setTaskCancellationTimeout(long timeout); @PublicEvolving void setRestartStrategy(RestartStrategies.RestartStrategyConfiguration restartStrategyConfiguration); @PublicEvolving @SuppressWarnings("deprecation") RestartStrategies.RestartStrategyConfiguration getRestartStrategy(); @Deprecated int getNumberOfExecutionRetries(); @Deprecated long getExecutionRetryDelay(); @Deprecated ExecutionConfig setNumberOfExecutionRetries(int numberOfExecutionRetries); @Deprecated ExecutionConfig setExecutionRetryDelay(long executionRetryDelay); void setExecutionMode(ExecutionMode executionMode); ExecutionMode getExecutionMode(); void enableForceKryo(); void disableForceKryo(); boolean isForceKryoEnabled(); void enableGenericTypes(); void disableGenericTypes(); boolean hasGenericTypesDisabled(); void enableForceAvro(); void disableForceAvro(); boolean isForceAvroEnabled(); ExecutionConfig enableObjectReuse(); ExecutionConfig disableObjectReuse(); boolean isObjectReuseEnabled(); @PublicEvolving void setCodeAnalysisMode(CodeAnalysisMode codeAnalysisMode); @PublicEvolving CodeAnalysisMode getCodeAnalysisMode(); ExecutionConfig enableSysoutLogging(); ExecutionConfig disableSysoutLogging(); boolean isSysoutLoggingEnabled(); GlobalJobParameters getGlobalJobParameters(); void setGlobalJobParameters(GlobalJobParameters globalJobParameters); void addDefaultKryoSerializer(Class<?> type, T serializer); void addDefaultKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass); void registerTypeWithKryoSerializer(Class<?> type, T serializer); @SuppressWarnings("rawtypes") void registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer> serializerClass); void registerPojoType(Class<?> type); void registerKryoType(Class<?> type); LinkedHashMap<Class<?>, SerializableSerializer<?>> getRegisteredTypesWithKryoSerializers(); LinkedHashMap<Class<?>, Class<? extends Serializer<?>>> getRegisteredTypesWithKryoSerializerClasses(); LinkedHashMap<Class<?>, SerializableSerializer<?>> getDefaultKryoSerializers(); LinkedHashMap<Class<?>, Class<? extends Serializer<?>>> getDefaultKryoSerializerClasses(); LinkedHashSet<Class<?>> getRegisteredKryoTypes(); LinkedHashSet<Class<?>> getRegisteredPojoTypes(); boolean isAutoTypeRegistrationDisabled(); void disableAutoTypeRegistration(); boolean isUseSnapshotCompression(); void setUseSnapshotCompression(boolean useSnapshotCompression); @Internal boolean isFailTaskOnCheckpointError(); @Internal void setFailTaskOnCheckpointError(boolean failTaskOnCheckpointError); @Override boolean equals(Object obj); @Override int hashCode(); boolean canEqual(Object obj); @Override @Internal ArchivedExecutionConfig archive(); @Deprecated
	static final int PARALLELISM_AUTO_MAX; static final int PARALLELISM_DEFAULT; static final int PARALLELISM_UNKNOWN; }### Answer:
@Test public void testDisableGenericTypes() { ExecutionConfig conf = new ExecutionConfig(); TypeInformation<Object> typeInfo = new GenericTypeInfo<Object>(Object.class); TypeSerializer<Object> serializer = typeInfo.createSerializer(conf); assertTrue(serializer instanceof KryoSerializer); conf.disableGenericTypes(); try { typeInfo.createSerializer(conf); fail("should have failed with an exception"); } catch (UnsupportedOperationException e) { } }