### Question:
ListBoxItem extends FormItem<String> implements ChoiceItem<String> { public void setChoices(Collection<String> choices, String defaultChoice) { Set<String> sortedChoices = new TreeSet<String>(choices); int i = 0; int idx = -1; listBox.clear(); for (String c : sortedChoices) { listBox.addItem(c); if (c.equals(defaultChoice)) idx = i; i++; } if (idx >= 0) listBox.setSelectedIndex(idx); else listBox.setSelectedIndex(-1); } ListBoxItem(String name, String title); @Override Widget asWidget(); void setChoices(Collection<String> choices, String defaultChoice); @Override String getValue(); @Override void setValue(String value); @Override void setEnabled(boolean b); @Override boolean validate(String value); @Override void clearValue();  }### Answer:
@Test public void testModification() { ListBoxItem lbi = new ListBoxItem("listbox", "List Box"); lbi.setChoices(Arrays.asList("And one", "And two"), "And one"); assertFalse("Precondition", lbi.isModified()); lbi.valueChangeHandler.onChange(null); assertTrue(lbi.isModified()); lbi.resetMetaData(); assertFalse(lbi.isModified()); }