testOk() {
    mockField.focus();
    mockField.dispatchBeforeChange();
    mockRange.removeContents();
    // Tests that an argument is a span with the custom message.
    const createdNodeMatcher = new ArgumentMatcher(function(arg) {
      return arg.nodeType == NodeType.ELEMENT && arg.tagName == TagName.SPAN &&
          googDom.getRawTextContent(arg) == CUSTOM_MESSAGE;
    });
    mockRange.insertNode(createdNodeMatcher, false);
    mockRange.$does(function(node, before) {
      return node;
    });
    mockPlaceCursorNextTo(createdNodeMatcher, false);
    stubs.set(googEditorRange, 'placeCursorNextTo', mockPlaceCursorNextTo);
    mockField.dispatchSelectionChangeEvent();
    mockField.dispatchChange();
    mockCtrl.$replayAll();

    plugin = new HelloWorldDialogPlugin();
    plugin.registerFieldObject(mockField);
    /** @suppress {visibility} suppression added to enable type checking */
    const dialog = plugin.createDialog(googDom.getDomHelper());

    // Mock of execCommand + clicking OK without actually opening the dialog.
    dialog.dispatchEvent(new OkEvent(CUSTOM_MESSAGE));

    mockCtrl.$verifyAll();
  }
Tests that when the OK event fires the editable field is properly updated.
@suppress {missingProperties,checkTypes} suppression added to enable type
checking