Program: 4968
Project: 4968
Buggy source:
@BeforeClass public static void init() throws Exception {
  zkServer=InMemoryZKServer.builder().setDataDir(TMP_FOLDER.newFolder()).build();
  zkServer.startAndWait();
  Configuration hConf=TEST_HBASE.getConfiguration();
  cConf.setInt(Constants.Stream.CONTAINER_INSTANCES,1);
  cConf.set(Constants.CFG_LOCAL_DATA_DIR,TMP_FOLDER.newFolder().getAbsolutePath());
  cConf.set(Constants.Zookeeper.QUORUM,zkServer.getConnectionStr());
  Injector injector=Guice.createInjector(new ConfigModule(cConf,hConf),new ZKClientModule(),new NonCustomLocationUnitTestModule().getModule(),new DiscoveryRuntimeModule().getInMemoryModules(),new TransactionMetricsModule(),new DataSetsModules().getInMemoryModules(),new SystemDatasetRuntimeModule().getInMemoryModules(),new ExploreClientModule(),new ViewAdminModules().getInMemoryModules(),new AuthorizationTestModule(),new AuthorizationEnforcementModule().getInMemoryModules(),new AuthenticationContextModules().getNoOpModule(),Modules.override(new DataFabricDistributedModule(),new StreamAdminModules().getDistributedModules()).with(new AbstractModule(){
    @Override protected void configure(){
      bind(TransactionStateStorage.class).to(NoOpTransactionStateStorage.class);
      bind(TransactionSystemClient.class).to(InMemoryTxSystemClient.class).in(Singleton.class);
      bind(StreamMetaStore.class).to(InMemoryStreamMetaStore.class);
      bind(NotificationFeedManager.class).to(NoOpNotificationFeedManager.class);
      bind(NamespaceQueryAdmin.class).to(SimpleNamespaceQueryAdmin.class);
      bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
      bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
    }
  }
));
  zkClientService=injector.getInstance(ZKClientService.class);
  zkClientService.startAndWait();
  streamAdmin=injector.getInstance(StreamAdmin.class);
  consumerFactory=injector.getInstance(StreamConsumerFactory.class);
  txClient=injector.getInstance(TransactionSystemClient.class);
  txManager=TxInMemory.getTransactionManager(txClient);
  queueClientFactory=injector.getInstance(QueueClientFactory.class);
  fileWriterFactory=injector.getInstance(StreamFileWriterFactory.class);
  txManager.startAndWait();
  tableUtil=injector.getInstance(HBaseTableUtil.class);
  ddlExecutor=new HBaseDDLExecutorFactory(cConf,TEST_HBASE.getHBaseAdmin().getConfiguration()).get();
  ddlExecutor.createNamespaceIfNotExists(tableUtil.getHBaseNamespace(NamespaceId.SYSTEM));
  ddlExecutor.createNamespaceIfNotExists(tableUtil.getHBaseNamespace(TEST_NAMESPACE));
  ddlExecutor.createNamespaceIfNotExists(tableUtil.getHBaseNamespace(OTHER_NAMESPACE));
  setupNamespaces(injector.getInstance(NamespacedLocationFactory.class));
}

Fixed version (ground truth):
@BeforeClass public static void init() throws Exception {
  zkServer=InMemoryZKServer.builder().setDataDir(TMP_FOLDER.newFolder()).build();
  zkServer.startAndWait();
  Configuration hConf=TEST_HBASE.getConfiguration();
  cConf.setInt(Constants.Stream.CONTAINER_INSTANCES,1);
  cConf.set(Constants.CFG_LOCAL_DATA_DIR,TMP_FOLDER.newFolder().getAbsolutePath());
  cConf.set(Constants.Zookeeper.QUORUM,zkServer.getConnectionStr());
  Injector injector=Guice.createInjector(new ConfigModule(cConf,hConf),new ZKClientModule(),new NonCustomLocationUnitTestModule().getModule(),new DiscoveryRuntimeModule().getInMemoryModules(),new TransactionMetricsModule(),new DataSetsModules().getInMemoryModules(),new SystemDatasetRuntimeModule().getInMemoryModules(),new ExploreClientModule(),new ViewAdminModules().getInMemoryModules(),new AuthorizationTestModule(),new AuthorizationEnforcementModule().getInMemoryModules(),new AuthenticationContextModules().getNoOpModule(),Modules.override(new DataFabricModules().getDistributedModules(),new StreamAdminModules().getDistributedModules()).with(new AbstractModule(){
    @Override protected void configure(){
      bind(TransactionStateStorage.class).to(NoOpTransactionStateStorage.class);
      bind(TransactionSystemClient.class).to(InMemoryTxSystemClient.class).in(Singleton.class);
      bind(StreamMetaStore.class).to(InMemoryStreamMetaStore.class);
      bind(NotificationFeedManager.class).to(NoOpNotificationFeedManager.class);
      bind(NamespaceQueryAdmin.class).to(SimpleNamespaceQueryAdmin.class);
      bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
      bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
    }
  }
));
  zkClientService=injector.getInstance(ZKClientService.class);
  zkClientService.startAndWait();
  streamAdmin=injector.getInstance(StreamAdmin.class);
  consumerFactory=injector.getInstance(StreamConsumerFactory.class);
  txClient=injector.getInstance(TransactionSystemClient.class);
  txManager=TxInMemory.getTransactionManager(txClient);
  queueClientFactory=injector.getInstance(QueueClientFactory.class);
  fileWriterFactory=injector.getInstance(StreamFileWriterFactory.class);
  txManager.startAndWait();
  tableUtil=injector.getInstance(HBaseTableUtil.class);
  ddlExecutor=new HBaseDDLExecutorFactory(cConf,TEST_HBASE.getHBaseAdmin().getConfiguration()).get();
  ddlExecutor.createNamespaceIfNotExists(tableUtil.getHBaseNamespace(NamespaceId.SYSTEM));
  ddlExecutor.createNamespaceIfNotExists(tableUtil.getHBaseNamespace(TEST_NAMESPACE));
  ddlExecutor.createNamespaceIfNotExists(tableUtil.getHBaseNamespace(OTHER_NAMESPACE));
  setupNamespaces(injector.getInstance(NamespacedLocationFactory.class));
}