ConstructionHeuristicForm implements IsElement { public void onConstructionHeuristicTypeSelected(String constructionHeuristicType) { model.setConstructionHeuristicType(ConstructionHeuristicType.valueOf(constructionHeuristicType)); } @Inject  ConstructionHeuristicForm(final ConstructionHeuristicFormView view); void setPhaseConfigForm(PhaseConfigForm phaseConfigForm); void onConstructionHeuristicTypeSelected(String constructionHeuristicType); void onEntitySorterMannerSelected(String entitySorterManner); void onConstructionHeuristicRemoved(); ConstructionHeuristicPhaseConfigModel getModel(); void setModel(ConstructionHeuristicPhaseConfigModel model); @Override HTMLElement getElement();  }
@Test public void onConstructionHeuristicTypeSelected() { when(model.getConstructionHeuristicType()).thenReturn(ConstructionHeuristicType.FIRST_FIT_DECREASING); when(model.getEntitySorterManner()).thenReturn(EntitySorterManner.DECREASING_DIFFICULTY); constructionHeuristicForm.setModel(model); constructionHeuristicForm.onConstructionHeuristicTypeSelected("FIRST_FIT"); verify(model).setConstructionHeuristicType(ConstructionHeuristicType.FIRST_FIT); }