optionsFactory and test