GuidedRuleTemplateEditorPresenter extends KieEditor<TemplateModel> { @Override protected Supplier<TemplateModel> getContentSupplier() { return this::getModel; } @Inject  GuidedRuleTemplateEditorPresenter(final GuidedRuleTemplateEditorView baseView); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); void handleImportAddedEvent(@Observes ImportAddedEvent event); void handleImportRemovedEvent(@Observes ImportRemovedEvent event); @Override void onSourceTabSelected(); @OnClose @Override void onClose(); @OnMayClose boolean mayClose(); @WorkbenchPartTitle String getTitleText(); @WorkbenchPartTitleDecoration IsWidget getTitle(); @WorkbenchPartView IsWidget getWidget(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); static final String EDITOR_ID; }
@Test public void testGetContentSupplier() throws Exception { final TemplateModel content = mock(TemplateModel.class); doReturn(content).when(presenter).getModel(); final Supplier<TemplateModel> contentSupplier = presenter.getContentSupplier(); assertEquals(content, contentSupplier.get()); }