Remove duplication in ConfigurationValidator.
Reduce method complexity in Adapter.