public void configure(ReadableConfig configuration, ClassLoader classLoader) {
        configuration.getOptional(PipelineOptions.GENERIC_TYPES).ifPresent(this::setGenericTypes);
        configuration.getOptional(PipelineOptions.FORCE_KRYO).ifPresent(this::setForceKryo);
        configuration.getOptional(PipelineOptions.FORCE_AVRO).ifPresent(this::setForceAvro);
        configuration
                .getOptional(PipelineOptions.FORCE_KRYO_AVRO)
                .ifPresent(this::setForceKryoAvro);

        configuration
                .getOptional(PipelineOptions.KRYO_DEFAULT_SERIALIZERS)
                .map(s -> parseKryoSerializersWithExceptionHandling(classLoader, s))
                .ifPresent(s -> this.defaultKryoSerializerClasses = s);

        configuration
                .getOptional(PipelineOptions.POJO_REGISTERED_CLASSES)
                .map(c -> loadClasses(c, classLoader, "Could not load pojo type to be registered."))
                .ifPresent(c -> this.registeredPojoTypes = c);

        configuration
                .getOptional(PipelineOptions.KRYO_REGISTERED_CLASSES)
                .map(c -> loadClasses(c, classLoader, "Could not load kryo type to be registered."))
                .ifPresent(c -> this.registeredKryoTypes = c);

        try {
            configuration
                    .getOptional(PipelineOptions.SERIALIZATION_CONFIG)
                    .ifPresent(c -> parseSerializationConfigWithExceptionHandling(classLoader, c));
        } catch (Exception e) {
            if (!GlobalConfiguration.isStandardYaml()) {
                throw new UnsupportedOperationException(
                        String.format(
                                "%s is only supported with the standard YAML config parser, please use \"config.yaml\" as the config file.",
                                PipelineOptions.SERIALIZATION_CONFIG.key()));
            }
            throw e;
        }
    }
@Test
    void testReadingDefaultConfig() {
        SerializerConfig config = new SerializerConfigImpl();
        Configuration configuration = new Configuration();

        // mutate config according to configuration
        config.configure(configuration, SerializerConfigImplTest.class.getClassLoader());

        assertThat(config).isEqualTo(new SerializerConfigImpl());
    }