OptionsBundle implements Config { @Override public Set<Option<?>> listOptions() { return Collections.unmodifiableSet(mOptions.keySet()); } OptionsBundle(TreeMap<Option<?>, Object> options); static OptionsBundle from(Config otherConfig); static OptionsBundle emptyBundle(); @Override Set<Option<?>> listOptions(); @Override boolean containsOption(Option<?> id); @Override ValueT retrieveOption(Option<ValueT> id); @Nullable @Override ValueT retrieveOption(Option<ValueT> id, @Nullable ValueT valueIfMissing); @Override void findOptions(String idStem, OptionMatcher matcher);  }
@Test public void canListOptions() { Set<Option<?>> list = mAllOpts.listOptions(); for (Option<?> opt : list) { assertThat(opt).isAnyOf(OPTION_1, OPTION_1_A, OPTION_2, OPTION_INTEGER_LIST); } assertThat(list).hasSize(4); }