PlannerDataObjectEditor extends ObjectEditor implements PlannerDataObjectEditorView.Presenter { @Override public String getName() { return "PLANNER_OBJECT_EDITOR"; } @Inject  PlannerDataObjectEditor(PlannerDataObjectEditorView view,
                                   DomainHandlerRegistry handlerRegistry,
                                   Event<DataModelerEvent> dataModelerEvent,
                                   DataModelCommandBuilder commandBuilder,
                                   TranslationService translationService,
                                   Caller<ComparatorDefinitionService> comparatorDefinitionService,
                                   Caller<AssetsUsageService> assetsUsageServiceCaller); @Override Widget asWidget(); @Override String getName(); @Override String getDomainName(); @Override void clear(); @Override void objectPropertyPathChanged(List<ObjectPropertyPath> objectPropertyPaths,
                                          boolean itemsRemoved); @Override void removeComparatorDefinition(DataObject dataObject,
                                           boolean resetPlanningEntityAnnotation); @Override void onNotInPlanningChange(); @Override void onPlanningEntityChange(); @Override void onPlanningSolutionChange(); @Override void onPlanningSolutionScoreTypeChange(); @Override void onPlanningSolutionBendableScoreHardLevelsSizeChange(); @Override void onPlanningSolutionBendableScoreSoftLevelsSizeChange();  }
@Test public void loadDataObjectWithBendableScoreType() { PlannerDataObjectEditor objectEditor = createObjectEditor(); DataObject dataObject = context.getDataObject(); dataObject.addAnnotation(DataModelerEditorsTestHelper.createAnnotation(PlanningSolution.class, null, null)); ObjectProperty scoreObjectProperty = new ObjectPropertyImpl("score", BendableScore.class.getName(), false); dataObject.addProperty(scoreObjectProperty); scoreObjectProperty.addAnnotation(DataModelerEditorsTestHelper.createAnnotation(PlanningScore.class, new Pair("bendableHardLevelsSize", 5), new Pair("bendableSoftLevelsSize", 10))); scoreObjectProperty.addAnnotation(DataModelerEditorsTestHelper.createAnnotation(Generated.class, null, null)); objectEditor.onContextChange(context); verify(view, times(1)).setPlanningSolutionBendableScoreHardLevelsSize(5); verify(view, times(1)).setPlanningSolutionBendableScoreSoftLevelsSize(10); }