### Question:
ServerLifecycleComponent extends AbstractLifecycleComponent<BookieConfiguration> { static ServerLifecycleComponent newComponent(Class<? extends ServerLifecycleComponent> theCls, BookieConfiguration conf, StatsLogger statsLogger) { try { Constructor<? extends ServerLifecycleComponent> constructor = theCls.getConstructor(BookieConfiguration.class, StatsLogger.class); constructor.setAccessible(true); return constructor.newInstance(conf, statsLogger); } catch (Exception e) { throw new RuntimeException(e); } } protected  ServerLifecycleComponent(String componentName, BookieConfiguration conf, StatsLogger statsLogger); static List<ServerLifecycleComponent> loadServerComponents(String[] componentClassNames,
                                                                      BookieConfiguration conf,
                                                                      StatsLogger statsLogger);  }### Answer:
@Test public void testNewComponent() throws Exception { BookieConfiguration conf = new BookieConfiguration(new ServerConfiguration()); StatsLogger statsLogger = NullStatsLogger.INSTANCE; ServerLifecycleComponent component = newComponent( TestComponent.class, conf, statsLogger); assertEquals("test-component", component.getName()); assertEquals(conf, component.getConf()); }