### Question:
AuthProviderController extends AbstractXulEventHandler { public void remove() { int index = this.model.getModelObjects().indexOf( this.model.getSelectedItem() ); if ( index >= 1 ) { index -= 1; } this.model.getModelObjects().remove( this.model.getSelectedItem() ); if ( !model.getModelObjects().isEmpty() ) { this.model.setSelectedItem( model.getModelObjects().get( index ) ); } else { this.model.setSelectedItem( null ); } } AuthProviderController(); void setBindingFactory( BindingFactory bf ); BindingFactory getBindingFactory(); void init(); void setResourceBundle( ResourceBundle res ); void open(); Collection<AuthProvider> getPossibleTypes(); void setNewOverlay( AuthProvider provider ); String getNewOverlay(); void onAccept(); void onCancel(); void addNew(); void remove(); void browse(); void addProviders( List<NamedProvider> providers );  }### Answer:
@Test public void testRemove() { controller.addProviders( providers ); controller.getModel().setSelectedItem( controller.getModel().getModelObjects().get( 0 ) ); controller.remove(); assertEquals( 7, controller.getModel().getModelObjects().size() ); }