### Question:
ServerLifecycleComponent extends AbstractLifecycleComponent<BookieConfiguration> { public static List<ServerLifecycleComponent> loadServerComponents(String[] componentClassNames, BookieConfiguration conf, StatsLogger statsLogger) { List<Class<? extends ServerLifecycleComponent>> componentClasses = Lists.newArrayListWithExpectedSize(componentClassNames.length); for (String componentClsName : componentClassNames) { componentClasses.add(ReflectionUtils.forName(componentClsName, ServerLifecycleComponent.class)); } return Lists.transform(componentClasses, cls -> newComponent(cls, conf, statsLogger)); } protected  ServerLifecycleComponent(String componentName, BookieConfiguration conf, StatsLogger statsLogger); static List<ServerLifecycleComponent> loadServerComponents(String[] componentClassNames,
                                                                      BookieConfiguration conf,
                                                                      StatsLogger statsLogger);  }### Answer:
@Test public void testLoadServerComponents() throws Exception { BookieConfiguration conf = new BookieConfiguration(new ServerConfiguration()); StatsLogger statsLogger = NullStatsLogger.INSTANCE; String[] clsNames = new String[] { TestComponent.class.getName(), TestComponent2.class.getName() }; List<ServerLifecycleComponent> components = loadServerComponents( clsNames, conf, statsLogger); assertEquals(2, components.size()); assertTrue(components.get(0) instanceof TestComponent); assertTrue(components.get(1) instanceof TestComponent2); }