### Question:
DMNDiagramEditor implements KieEditorWrapperView.KieEditorWrapperPresenter { Supplier<Integer> getHashcodeSupplier() { return () -> getDiagram().hashCode(); } @Inject  DMNDiagramEditor(final SessionManager sessionManager,
                            final SessionCommandManager<AbstractCanvasHandler> sessionCommandManager,
                            final SessionEditorPresenter<EditorSession> presenter,
                            final Event<RefreshFormPropertiesEvent> refreshFormPropertiesEvent,
                            final Event<ChangeTitleWidgetEvent> changeTitleNotificationEvent,
                            final Event<SessionFocusedEvent> sessionFocusedEvent,
                            final DecisionNavigatorDock decisionNavigatorDock,
                            final DiagramEditorPropertiesDock diagramPropertiesDock,
                            final PreviewDiagramDock diagramPreviewAndExplorerDock,
                            final @DMNEditor DMNLayoutHelper layoutHelper,
                            final OpenDiagramLayoutExecutor layoutExecutor,
                            final DataTypesPage dataTypesPage,
                            final IncludedModelsPage includedModelsPage,
                            final @DMNEditor DocumentationView<Diagram> documentationView,
                            final DMNEditorSearchIndex editorSearchIndex,
                            final SearchBarComponent<DMNSearchableElement> searchBarComponent,
                            final DefinitionManager definitionManager,
                            final ClientFactoryService clientFactoryServices,
                            final DMNShowcaseDiagramService diagramService,
                            final MenuDevCommandsBuilder menuDevCommandsBuilder,
                            final ScreenPanelView screenPanelView,
                            final ScreenErrorView screenErrorView,
                            final KieEditorWrapperView kieView,
                            final MonacoFEELInitializer feelInitializer,
                            final DMNDiagramsSession dmnDiagramsSession,
                            final DMNMarshallerService marshallerService,
                            final DRDNameChanger drdNameChanger,
                            final LazyCanvasFocusUtils lazyCanvasFocusUtils); @PostConstruct void init(); void onDataTypePageNavTabActiveEvent(final @Observes DataTypePageTabActiveEvent event); @OnStartup void onStartup(final PlaceRequest placeRequest); void onDataTypeEditModeToggle(final @Observes DataTypeEditModeToggleEvent editModeToggleEvent); void onMultiPageEditorSelectedPageEvent(final @Observes MultiPageEditorSelectedPageEvent event); void onRefreshFormPropertiesEvent(final @Observes RefreshFormPropertiesEvent event); @OnFocus void onFocus(); @OnClose void onClose(); @WorkbenchMenu void getMenu(final Consumer<Menus> menusConsumer); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView IsWidget getWidget(); @WorkbenchContextId String getMyContextRef(); @Override void onSourceTabSelected(); @Override void onEditTabSelected(); @Override void onEditTabUnselected(); @Override void onOverviewSelected(); static final String EDITOR_ID; }### Answer:
@Test public void testGetHashcodeSupplier() { final Diagram diagram = new DiagramImpl("something", null); final Integer expectedHashcode = diagram.hashCode(); doReturn(diagram).when(editor).getDiagram(); final Integer actualHashcode = editor.getHashcodeSupplier().get(); assertEquals(expectedHashcode, actualHashcode); }