public ClientRequestSelectorTest() throws IOException {
dir = new File("split-file-inserter-storage-test");
dir.mkdir();
executor = new WaitableExecutor(new PooledExecutor());
ticker = new CheatingTicker(executor);
RandomSource r = new DummyRandomSource(12345);
fg = new FilenameGenerator(r, true, dir, "freenet-test");
persistentFileTracker = new TrivialPersistentFileTracker(dir, fg);
bigRAFFactory = new PooledFileRandomAccessBufferFactory(fg, r);
smallBucketFactory = new ArrayBucketFactory();
bigBucketFactory = new TempBucketFactory(executor, fg, 0, 0, r, false, 0, null);
baseContext = HighLevelSimpleClientImpl.makeDefaultInsertContext(bigBucketFactory, new SimpleEventProducer());
cryptoKey = new byte[32];
r.nextBytes(cryptoKey);
checker = new CRCChecksumChecker();
memoryLimitedJobRunner = new MemoryLimitedJobRunner(9*1024*1024L, 20, executor);
jobRunner = new DummyJobRunner(executor, null);
URI = FreenetURI.generateRandomCHK(r);
}