### Question:
MonacoEditorWidget extends TextBoxBase { public void setValue(final String value) { getCodeEditor().ifPresent(c -> c.setValue(value)); } MonacoEditorWidget(); void setCodeEditor(final MonacoStandaloneCodeEditor codeEditor); void setValue(final String value); @Override String getValue(); @Override void setFocus(final boolean focused); Optional<MonacoStandaloneCodeEditor> getCodeEditor(); @Override void setTabIndex(final int index);  }### Answer:
@Test public void testSetValueWhenCodeEditorIsPresent() { final String value = "value"; widget.setValue(value); verify(codeEditor).setValue(value); }