Improve `BaseConfigurationOptimizer` and its tests.