@Test public void loadsPlugins() { ConfiguredPluginFactory f1 = new ConfiguredPluginFactory("plugin1", any -> stubPlugin("MyResponse1")); ConfiguredPluginFactory f2 = new ConfiguredPluginFactory("plugin2", any -> stubPlugin("MyResponse2")); StyxServerComponents components = new StyxServerComponents.Builder() .styxConfig(new StyxConfig()) .pluginFactories(ImmutableList.of(f1, f2)) .build(); List<NamedPlugin> plugins = components.plugins(); List<String> names = plugins.stream().map(NamedPlugin::name).collect(toList()); assertThat(names, contains("plugin1", "plugin2")); }
public List<NamedPlugin> plugins() { return plugins; }
StyxServerComponents { public List<NamedPlugin> plugins() { return plugins; } }
StyxServerComponents { public List<NamedPlugin> plugins() { return plugins; } private  StyxServerComponents(Builder builder); }
StyxServerComponents { public List<NamedPlugin> plugins() { return plugins; } private  StyxServerComponents(Builder builder); boolean showBanner(); Environment environment(); Map<String, StyxService> services(); List<NamedPlugin> plugins(); StyxObjectStore<RoutingObjectRecord> routeDatabase(); StyxObjectStore<StyxObjectRecord<StyxService>> servicesDatabase(); StyxObjectStore<StyxObjectRecord<NettyExecutor>> executors(); StyxObjectStore<StyxObjectRecord<InetServer>> serversDatabase(); RoutingObjectFactory.Context routingObjectFactoryContext(); NettyExecutor clientExecutor(); StartupConfig startupConfig(); }
StyxServerComponents { public List<NamedPlugin> plugins() { return plugins; } private  StyxServerComponents(Builder builder); boolean showBanner(); Environment environment(); Map<String, StyxService> services(); List<NamedPlugin> plugins(); StyxObjectStore<RoutingObjectRecord> routeDatabase(); StyxObjectStore<StyxObjectRecord<StyxService>> servicesDatabase(); StyxObjectStore<StyxObjectRecord<NettyExecutor>> executors(); StyxObjectStore<StyxObjectRecord<InetServer>> serversDatabase(); RoutingObjectFactory.Context routingObjectFactoryContext(); NettyExecutor clientExecutor(); StartupConfig startupConfig();  }