Unit tests for ConfigReader, corresponding refactoring