@Test public void testAddPlugin() { assertThat(pluginDocTree.getPlugin("MyPlugin"), nullValue()); pluginDocTree.addPlugin("MyPlugin", pluginDoc1); assertThat(pluginDocTree.getPlugin("MyPlugin"), is(pluginDoc1)); }
public void addPlugin(String name, PluginDoc plugin) { checkNotNull(name, "name"); checkNotNull(plugin, "plugin"); plugins.put(name, plugin); }
PluginDocTree { public void addPlugin(String name, PluginDoc plugin) { checkNotNull(name, "name"); checkNotNull(plugin, "plugin"); plugins.put(name, plugin); } }
PluginDocTree { public void addPlugin(String name, PluginDoc plugin) { checkNotNull(name, "name"); checkNotNull(plugin, "plugin"); plugins.put(name, plugin); }  }
PluginDocTree { public void addPlugin(String name, PluginDoc plugin) { checkNotNull(name, "name"); checkNotNull(plugin, "plugin"); plugins.put(name, plugin); }  void addPlugin(String name, PluginDoc plugin); void addCommand(String pluginName, CommandDoc command); Set<String> getPluginNames(); PluginDoc getPlugin(String name); List<CommandDoc> getCommands(String pluginName); }
PluginDocTree { public void addPlugin(String name, PluginDoc plugin) { checkNotNull(name, "name"); checkNotNull(plugin, "plugin"); plugins.put(name, plugin); }  void addPlugin(String name, PluginDoc plugin); void addCommand(String pluginName, CommandDoc command); Set<String> getPluginNames(); PluginDoc getPlugin(String name); List<CommandDoc> getCommands(String pluginName);  }