File tempFile = File.createTempFile("foo", "bar");
tempFile.deleteOnExit();
File tempDir = tempFile.getParentFile();
String tmpDirPath = tempDir.getAbsolutePath();
CatalogServiceLocalFactory factory = new CatalogServiceLocalFactory();
factory.setCatalogRepositoryFactory(new MemoryBasedCatalogRepositoryFactory());
factory.setIngestMapperFactory(this.getOracleIngestMapperFactory(tmpDirPath));
factory.setOneCatalogFailsAllFail(true);
factory.setSimplifyQueries(true);
factory.setPluginStorageDir("/dev/null");
factory.setRestrictIngestPermissions(false);
factory.setRestrictQueryPermissions(false);
factory.setTransactionIdFactory(UuidTransactionIdFactory.class.getCanonicalName());
cs = factory.createCatalogService();
CatalogFactory catalogFactory = new CatalogFactory();
catalogFactory.setCatalogId("TestCatalog1");
catalogFactory.setDictionaryFactories(null);
catalogFactory.setIndexFactory(getInMemoryDSFactory(tmpDirPath + "/1/"));