@Deprecated
    public void disableGenericTypes() {
        serializerConfig.setGenericTypes(false);
    }
@Test
    void testDisableGenericTypes() {
        SerializerConfigImpl conf = new SerializerConfigImpl();
        TypeInformation<Object> typeInfo = new GenericTypeInfo<>(Object.class);

        // by default, generic types are supported
        TypeSerializer<Object> serializer = typeInfo.createSerializer(conf);
        assertThat(serializer).isInstanceOf(KryoSerializer.class);

        // expect an exception when generic types are disabled
        conf.setGenericTypes(false);
        assertThatThrownBy(
                        () -> typeInfo.createSerializer(conf),
                        "should have failed with an exception")
                .isInstanceOf(UnsupportedOperationException.class);
    }