### Question:
JavaFunctionEditorDefinition extends BaseSupplementaryFunctionEditorDefinition { @Override public String getName() { return translationService.format(DMNEditorConstants.ExpressionEditor_JavaFunctionType); } JavaFunctionEditorDefinition(); @Inject  JavaFunctionEditorDefinition(final DefinitionUtils definitionUtils,
                                        final SessionManager sessionManager,
                                        final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                                        final @DMNEditor DefaultCanvasCommandFactory canvasCommandFactory,
                                        final Event<ExpressionEditorChanged> editorSelectedEvent,
                                        final Event<RefreshFormPropertiesEvent> refreshFormPropertiesEvent,
                                        final Event<DomainObjectSelectionEvent> domainObjectSelectionEvent,
                                        final ListSelectorView.Presenter listSelector,
                                        final TranslationService translationService,
                                        final @DMNEditor Supplier<ExpressionEditorDefinitions> expressionEditorDefinitionsSupplier,
                                        final @DMNEditor ReadOnlyProvider readOnlyProvider); @Override ExpressionType getType(); @Override String getName(); static final String VARIABLE_CLASS; static final String VARIABLE_METHOD_SIGNATURE; }### Answer:
@Test public void testName() { assertEquals(DMNEditorConstants.ExpressionEditor_JavaFunctionType, definition.getName()); }
@Test public void testModelEnrichment() { final Optional<Context> oModel = definition.getModelClass(); definition.enrich(Optional.empty(), hasExpression, oModel); final Context model = oModel.get(); assertEquals(2, model.getContextEntry().size()); assertEquals(JavaFunctionEditorDefinition.VARIABLE_CLASS, model.getContextEntry().get(0).getVariable().getName().getValue()); assertTrue(model.getContextEntry().get(0).getExpression() instanceof LiteralExpression); assertEquals(model, model.getContextEntry().get(0).getParent()); assertEquals(JavaFunctionEditorDefinition.VARIABLE_METHOD_SIGNATURE, model.getContextEntry().get(1).getVariable().getName().getValue()); assertTrue(model.getContextEntry().get(1).getExpression() instanceof LiteralExpression); assertEquals(model, model.getContextEntry().get(1).getParent()); }