@Test
public void testServiceLoaderStrategyOption() throws Exception {

	final ConfigurationOption<Strategy> option = ConfigurationOption.serviceLoaderStrategyOption(Strategy.class)
			.key("test.strategy")
			.dynamic(true)
			.buildWithDefault(new DefaultStrategyImpl());
	final ConfigurationRegistry configuration = createConfiguration(Collections.singletonList(option), new SimpleSource());
	assertThat(option.getValidOptions()).containsExactlyInAnyOrder(DefaultStrategyImpl.class.getName(), SpecialStrategyImpl.class.getName());
	assertThat(option.getValue()).isInstanceOf(DefaultStrategyImpl.class);
	configuration.save("test.strategy", SpecialStrategyImpl.class.getName(), SimpleSource.NAME);
	assertThat(option.getValue()).isInstanceOf(SpecialStrategyImpl.class);
	assertThatThrownBy(() -> configuration.save("test.strategy", NoMetaInfServicesStrategyImpl.class.getName(), SimpleSource.NAME))
			.isInstanceOf(IllegalArgumentException.class)
			.hasMessageContaining("Invalid option");
}