@Test
public void testAliasKey() throws Exception {

	class Provider extends ConfigurationOptionProvider {
		private ConfigurationOption<String> aliasOption = ConfigurationOption.stringOption()
				.key("foo")
				.aliasKeys("foo.old")
				.buildRequired();
	}
	final ConfigurationRegistry configurationRegistry = ConfigurationRegistry.builder()
			.addOptionProvider(new Provider())
			.addConfigSource(new SimpleSource().add("foo.old", "bar"))
			.build();
	configurationLogger.logConfiguration(configurationRegistry);
	verify(logger).warn(eq("Detected usage of an old configuration key: '{}'. " +
			"Please use '{}' instead."), eq("foo.old"), eq("foo"));
}