PluginManager { public void add(Plugin plugin) { plugins.add(plugin); } @Inject @VisibleForTesting  PluginManager(
		@Named("developerMode") final boolean developerMode,
		@Named("safeMode") final boolean safeMode,
		final EventBus eventBus,
		final Scheduler scheduler,
		final ConfigManager configManager,
		final ScheduledExecutorService executor,
		final Provider<GameEventManager> sceneTileManager); @Subscribe void onSessionOpen(SessionOpen event); @Subscribe void onSessionClose(SessionClose event); Config getPluginConfigProxy(Plugin plugin); List<Config> getPluginConfigProxies(Collection<Plugin> plugins); void loadDefaultPluginConfiguration(Collection<Plugin> plugins); void startPlugins(); void loadCorePlugins(); List<Plugin> loadPlugins(List<Class<?>> plugins, BiConsumer<Integer, Integer> onPluginLoaded); boolean startPlugin(Plugin plugin); boolean stopPlugin(Plugin plugin); void setPluginEnabled(Plugin plugin, boolean enabled); boolean isPluginEnabled(Plugin plugin); void add(Plugin plugin); void remove(Plugin plugin); Collection<Plugin> getPlugins();  }
@Test public void ensureNoDuplicateConfigKeyNames() { for (final Class<?> clazz : configClasses) { final Set<String> configKeyNames = new HashSet<>(); for (final Method method : clazz.getMethods()) { if (!method.isDefault()) { continue; } final ConfigItem annotation = method.getAnnotation(ConfigItem.class); if (annotation == null) { continue; } final String configKeyName = annotation.keyName(); if (configKeyNames.contains(configKeyName)) { throw new IllegalArgumentException("keyName " + configKeyName + " is duplicated in " + clazz); } configKeyNames.add(configKeyName); } } }