PhaseConfigForm implements IsWidget { public void removeConstructionHeuristic(final ConstructionHeuristicForm constructionHeuristicForm) { phaseFormList.remove(constructionHeuristicForm); view.removeConstructionHeuristic(constructionHeuristicForm.getElement()); model.remove(constructionHeuristicForm.getModel()); constructionHeuristicFormProvider.destroy(constructionHeuristicForm); 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 removeConstructionHeuristic() { phaseConfigForm.removeConstructionHeuristic(constructionHeuristicForm); verify(view).removeConstructionHeuristic(constructionHeuristicForm.getElement()); }