ConstructionHeuristicForm implements IsElement { public void onEntitySorterMannerSelected(String entitySorterManner) { model.setEntitySorterManner(EntitySorterManner.valueOf(entitySorterManner)); } @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 onEntitySorterMannerSelected() { when(model.getConstructionHeuristicType()).thenReturn(ConstructionHeuristicType.FIRST_FIT_DECREASING); when(model.getEntitySorterManner()).thenReturn(EntitySorterManner.DECREASING_DIFFICULTY_IF_AVAILABLE); constructionHeuristicForm.setModel(model); constructionHeuristicForm.onEntitySorterMannerSelected("DECREASING_DIFFICULTY"); verify(model).setEntitySorterManner(EntitySorterManner.DECREASING_DIFFICULTY); }