### Question:
SimonConsolePluginManager { public void addPlugin(SimonConsolePlugin plugin) { SimonConsolePlugin existingPlugin = getPluginById(plugin.getId()); if (existingPlugin != null) { throw new IllegalArgumentException("Plugin " + plugin.getId() + " already registered"); } plugins.add(plugin); }  List<SimonConsolePlugin> getPlugins(); List<T> getPluginsByType(Class<T> pluginType); SimonConsolePlugin getPluginById(String id); void addPlugin(SimonConsolePlugin plugin); void addPlugin(Class<T> pluginType); void addPlugin(String pluginTypeName); void addPlugins(String pluginTypeNames); boolean removePluginById(String id); List<ActionBinding> getActionBindings();  }### Answer:
@Test(expectedExceptions = {IllegalArgumentException.class}) public void testAddPluginNotFound() { pluginManager.addPlugin("com.mycompany.myapp.MySimonPlugin"); }
@Test(expectedExceptions = {IllegalArgumentException.class}) public void testAddPluginType() { pluginManager.addPlugin("java.lang.String"); }
@Test(expectedExceptions = {IllegalArgumentException.class}) public void testAddPluginDuplicate() { pluginManager.addPlugin(DummyDetailPlugin.class.getName() + "," + DummyDetailPlugin.class.getName()); }