@Test
public void testLogSensitive() throws Exception {

	class Provider extends ConfigurationOptionProvider {
		private ConfigurationOption<String> sensitiveOption = ConfigurationOption.stringOption()
				.key("foo")
				.sensitive()
				.buildRequired();
	}
	final ConfigurationRegistry configurationRegistry = ConfigurationRegistry.builder()
			.addOptionProvider(new Provider())
			.addConfigSource(new SimpleSource("source").add("foo", "secret"))
			.build();
	configurationLogger.logConfiguration(configurationRegistry);
	verify(logger).info(startsWith("# stagemonitor configuration"));
	verify(logger).info(eq("{}: {} (source: {})"), eq("foo"), eq("XXXX"), eq("source"));
}