testRegisterPlugin() {
    const editableField = new FieldConstructor('testField');
    const plugin = new TestPlugin();

    editableField.registerPlugin(plugin);

    assertEquals(
        'Registered plugin must be in protected plugin map.', plugin,
        editableField.plugins_[plugin.getTrogClassId()]);
    assertEquals(
        'Plugin has a keydown handler, should be in keydown map', plugin,
        editableField.indexedPlugins_[Plugin.Op.KEYDOWN][0]);
    assertEquals(
        'Plugin has a keypress handler, should be in keypress map', plugin,
        editableField.indexedPlugins_[Plugin.Op.KEYPRESS][0]);
    assertEquals(
        'Plugin has a keyup handler, should be in keuup map', plugin,
        editableField.indexedPlugins_[Plugin.Op.KEYUP][0]);
    assertEquals(
        'Plugin has a selectionchange handler, should be in selectionchange map',
        plugin, editableField.indexedPlugins_[Plugin.Op.SELECTION][0]);
    assertEquals(
        'Plugin has a shortcut handler, should be in shortcut map', plugin,
        editableField.indexedPlugins_[Plugin.Op.SHORTCUT][0]);
    assertEquals(
        'Plugin has a execCommand, should be in execCommand map', plugin,
        editableField.indexedPlugins_[Plugin.Op.EXEC_COMMAND][0]);
    assertEquals(
        'Plugin has a queryCommand, should be in queryCommand map', plugin,
        editableField.indexedPlugins_[Plugin.Op.QUERY_COMMAND][0]);
    assertEquals(
        'Plugin does not have a prepareContentsHtml,' +
            'should not be in prepareContentsHtml map',
        undefined,
        editableField.indexedPlugins_[Plugin.Op.PREPARE_CONTENTS_HTML][0]);
    assertEquals(
        'Plugin does not have a cleanContentsDom,' +
            'should not be in cleanContentsDom map',
        undefined,
        editableField.indexedPlugins_[Plugin.Op.CLEAN_CONTENTS_DOM][0]);
    assertEquals(
        'Plugin does not have a cleanContentsHtml,' +
            'should not be in cleanContentsHtml map',
        undefined,
        editableField.indexedPlugins_[Plugin.Op.CLEAN_CONTENTS_HTML][0]);

    editableField.dispose();
  }
Tests that calling registerPlugin will add the plugin to the
plugin map.