### Question:
PreviewRunnerTwillRunnable extends AbstractTwillRunnable { @VisibleForTesting static Injector createInjector(CConfiguration cConf, Configuration hConf, PreviewRequestPollerInfo pollerInfo) { List<Module> modules = new ArrayList<>(); byte[] pollerInfoBytes = Bytes.toBytes(new Gson().toJson(pollerInfo)); SConfiguration sConf = SConfiguration.create(); modules.add(new ConfigModule(cConf, hConf, sConf)); modules.add(new PreviewConfigModule(cConf, hConf, sConf)); modules.add(new IOModule()); modules.add(new MetricsClientRuntimeModule().getDistributedModules()); MasterEnvironment masterEnv = MasterEnvironments.getMasterEnvironment(); if (masterEnv == null) { modules.add(new ZKClientModule()); modules.add(new ZKDiscoveryModule()); modules.add(new KafkaClientModule()); modules.add(new KafkaLogAppenderModule()); } else { modules.add(new AbstractModule() { @Override protected void configure() { bind(DiscoveryService.class) .toProvider(new SupplierProviderBridge<>(masterEnv.getDiscoveryServiceSupplier())); bind(DiscoveryServiceClient.class) .toProvider(new SupplierProviderBridge<>(masterEnv.getDiscoveryServiceClientSupplier())); } }); modules.add(new RemoteLogAppenderModule()); } modules.add(new PreviewRunnerManagerModule().getDistributedModules()); modules.add(new DataSetServiceModules().getStandaloneModules()); modules.add(new DataSetsModules().getStandaloneModules()); modules.add(new AppFabricServiceRuntimeModule().getStandaloneModules()); modules.add(new ProgramRunnerRuntimeModule().getStandaloneModules()); modules.add(new MetricsStoreModule()); modules.add(new MessagingClientModule()); modules.add(new AuditModule()); modules.add(new SecureStoreClientModule()); modules.add(new MetadataReaderWriterModules().getStandaloneModules()); modules.add(new DFSLocationModule()); modules.add(new MetadataServiceModule()); modules.add(new AuthorizationModule()); modules.add(new AuthorizationEnforcementModule().getMasterModule()); modules.add(Modules.override( new DataFabricModules("master").getDistributedModules()).with(new AbstractModule() { @Override protected void configure() { bind(TransactionSystemClientService.class).to(DelegatingTransactionSystemClientService.class); bind(TransactionSystemClient.class).to(ConstantTransactionSystemClient.class); bind(ExploreClient.class).to(UnsupportedExploreClient.class); bind(PreviewRequestPollerInfoProvider.class).toInstance(() -> pollerInfoBytes); } })); return Guice.createInjector(modules); } PreviewRunnerTwillRunnable(String cConfFileName, String hConfFileName); @Override void initialize(TwillContext context); @Override void run(); @Override void stop(); @Override void destroy();  }### Answer:
@Test public void testInjector() { Injector injector = PreviewRunnerTwillRunnable.createInjector(CConfiguration.create(), new Configuration(), new PreviewRequestPollerInfo(0, "testuid")); injector.getInstance(PreviewRunnerManager.class); }