HtmlEditor extends BaseEditor<String, DefaultMetadata> { @Override protected Supplier<String> getContentSupplier() { return editor::getContent; } @Inject  HtmlEditor(final HtmlResourceType htmlResourceType,
                      final HtmlEditorPresenter editor,
                      final Caller<HtmlEditorService> htmlEditorService); @PostConstruct void init(); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @Override @WorkbenchPartTitleDecoration IsWidget getTitle(); @Override @WorkbenchPartTitle String getTitleText(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); @WorkbenchPartView IsWidget getView();  }
@Test public void testGetContentSupplier() { final String content = "content"; doReturn(content).when(presenter).getContent(); final Supplier<String> contentSupplier = htmlEditor.getContentSupplier(); assertEquals(content, contentSupplier.get()); }