diff --git a/cuppa/src/main/java/org/forgerock/cuppa/model/Options.java b/cuppa/src/main/java/org/forgerock/cuppa/model/Options.java index 720a4da..685b63b 100644 --- a/cuppa/src/main/java/org/forgerock/cuppa/model/Options.java +++ b/cuppa/src/main/java/org/forgerock/cuppa/model/Options.java @@ -65,13 +65,13 @@ public > Optional get(Class optionClass) { } /** - * Removes an option. + * Un-sets an option. * - * @param optionClass The class of the option to remove. + * @param optionClass The class of the option to un-set. * @param The type of the option. * @return A new Option instance without the specified option. */ - public > Options remove(Class optionClass) { + public > Options unset(Class optionClass) { Options copy = copyOf(this); copy.options.remove(optionClass); return copy; diff --git a/cuppa/src/test/java/org/forgerock/cuppa/OptionsTest.java b/cuppa/src/test/java/org/forgerock/cuppa/OptionsTest.java index 143105b..83e67f8 100644 --- a/cuppa/src/test/java/org/forgerock/cuppa/OptionsTest.java +++ b/cuppa/src/test/java/org/forgerock/cuppa/OptionsTest.java @@ -37,7 +37,7 @@ public void addingNewOptionShouldReturnNewOptionCopy() { @Test public void removingOptionShouldReturnNewOptionCopy() { Options options = new Options().set(new TestOption()); - Options optionsCopy = options.remove(TestOption.class); + Options optionsCopy = options.unset(TestOption.class); assertThat(options.get(TestOption.class)).isNotEqualTo(Optional.empty()); assertThat(optionsCopy.get(TestOption.class)).isEqualTo(Optional.empty()); }