### Question:
SelectableOptionsModel { public void clear() { d_options.clear(); } SelectableOptionsModel(); void clear(); ModifiableHolder<Boolean> addOption(E option, boolean initialValue); List<ModifiableHolder<Boolean>> addOptions(Collection<? extends E> options, boolean initialValue); ModifiableHolder<Boolean> getSelectedModel(E option); ObservableList<Option<E>> getOptions(); ObservableList<E> getSelectedOptions();  }### Answer:
@Test public void testClear() { d_model.addOption("Bladerdeeg", false); d_model.addOption("Geitenkaas", true); d_model.addOption("Komijn", false); d_model.addOption("Makreel", true); final ModifiableHolder<Integer> count = new ModifiableHolder<Integer>(0); ObservableList<String> list = d_model.getSelectedOptions(); ListDataListener counter = new ListDataListener() { @Override public void intervalRemoved(ListDataEvent e) { count.setValue(count.getValue() + (e.getIndex1() - e.getIndex0()) + 1); } @Override public void intervalAdded(ListDataEvent e) { Assert.fail("Expected INTERVAL_REMOVED, but got " + e); } @Override public void contentsChanged(ListDataEvent e) { Assert.fail("Expected INTERVAL_REMOVED, but got " + e); } }; list.addListDataListener(counter); d_model.clear(); list.removeListDataListener(counter); assertEquals(new Integer(2), count.getValue()); assertEquals(Collections.emptyList(), d_model.getSelectedOptions()); }