DefaultPluginManager implements PluginManager { @Override public <T> void register(T plugin) { context.addPlugin(plugin); } DefaultPluginManager(PluginContext context, AnnotationProcessor annotationProcessor, DependencyResolver dependencyResolver); @Override void register(T plugin); @Override void register(String name, T plugin); @Override T getPlugin(String name); @Override T getPlugin(Class<T> pluginClass); @Override Collection<PluginRef> getAllPlugins(); @Override T removePlugin(String name); @Override T removePlugin(T plugin); @Override Collection<Object> loadPlugins(PluginSource source);  }
@Test public void shouldRegisterAPlugin() { manager.register(plugin); verify(mockContext).addPlugin(eq(plugin)); }