ScoreHolderUtils { public String extractScoreTypeFqn(final DataObject dataObject) { if (dataObject.getAnnotation(PlanningSolution.class.getName()) != null) { final ObjectProperty scoreObjectProperty = dataObject.getProperty("score"); if (scoreObjectProperty != null) { return scoreObjectProperty.getClassName(); } } return null; } ScoreHolderUtils(); String extractScoreTypeFqn(final DataObject dataObject); String getScoreHolderTypeFqn(final String scoreTypeFqn);  }
@Test public void extractScoreTypeFqn() { DataObject dataObject = new DataObjectImpl("test", "Test"); dataObject.addAnnotation(new AnnotationImpl(DriverUtils.buildAnnotationDefinition(PlanningSolution.class))); dataObject.addProperty("score", HardSoftScore.class.getName()); String result = scoreHolderUtils.extractScoreTypeFqn(dataObject); assertEquals(HardSoftScore.class.getName(), result); }