### Question:
SelectVariablesPresentation extends Model implements SelectFromFiniteListPresentation<T> { public void removeSlot(int idx) { StudyOutcomeMeasure<T> s = d_slots.get(idx); d_slots.remove(idx); unbindSlot(s); } SelectVariablesPresentation(ObservableList<T> options, Class<T> type, String title, String description, WhenTakenFactory wtf, AddisWindow mainWindow); ObservableList<T> getOptions(); void addSlot(); int countSlots(); void removeSlot(int idx); StudyOutcomeMeasure<T> getSlot(int idx); ValueModel getAddSlotsEnabledModel(); ValueModel getInputCompleteModel(); boolean hasAddOptionDialog(); void showAddOptionDialog(int idx); String getTypeName(); String getTitle(); String getDescription(); List<ModifiableHolder<T>> getSlots(); void setSlots(List<StudyOutcomeMeasure<T>> slots); static final String PROPERTY_NSLOTS; }### Answer:
@Test public void testRemoveSlot() { d_pm.addSlot(); assertEquals(1, d_pm.countSlots()); d_pm.removeSlot(0); assertEquals(0, d_pm.countSlots()); d_pm.addSlot(); d_pm.getSlot(0).setValue(d_ade1); d_pm.addSlot(); d_pm.getSlot(1).setValue(d_ade2); d_pm.removeSlot(0); assertEquals(d_pm.getSlot(0).getValue(), d_ade2); }