PhaseConfigForm implements IsWidget { public void removeLocalSearch(final LocalSearchForm localSearchForm) { phaseFormList.remove(localSearchForm); view.removeLocalSearch(localSearchForm.getElement()); model.remove(localSearchForm.getModel()); localSearchFormProvider.destroy(localSearchForm); if (phaseFormList.isEmpty()) { view.displayEmptyPhaseConfigurationLabel(true); } } @Inject  PhaseConfigForm(final PhaseConfigFormView view,
                           final ManagedInstance<ConstructionHeuristicForm> constructionHeuristicFormProvider,
                           final ManagedInstance<LocalSearchForm> localSearchFormProvider); void addConstructionHeuristic(); void addConstructionHeuristic(final ConstructionHeuristicPhaseConfigModel constructionHeuristicPhaseConfigModel); void removeConstructionHeuristic(final ConstructionHeuristicForm constructionHeuristicForm); void addLocalSearch(); void addLocalSearch(final LocalSearchPhaseConfigModel localSearchPhaseConfigModel); void removeLocalSearch(final LocalSearchForm localSearchForm); List<PhaseConfigModel> getModel(); void setModel(final List<PhaseConfigModel> model); @Override Widget asWidget();  }
@Test public void removeLocalSearch() { phaseConfigForm.removeLocalSearch(localSearchForm); verify(view).removeLocalSearch(localSearchForm.getElement()); }