DSLEditorPresenter extends KieEditor<String> { @Override protected Supplier<String> getContentSupplier() { return () -> view.getContent(); } @Inject  DSLEditorPresenter(final DSLEditorView baseView); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @OnClose @Override void onClose(); @OnMayClose boolean mayClose(); @WorkbenchPartTitleDecoration IsWidget getTitle(); @WorkbenchPartTitle String getTitleText(); @WorkbenchPartView IsWidget getWidget(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); static final String EDITOR_ID; }
@Test public void testGetContentSupplier() throws Exception { final String content = ""; doReturn(content).when(view).getContent(); final Supplier<String> contentSupplier = dslEditor.getContentSupplier(); assertEquals(content, contentSupplier.get()); }