public void testCancel() throws IOException, InsertException, MissingKeyException {
Random r = new Random(12124);
long size = 32768*6;
BarrierRandomAccessBuffer data = new BarrierRandomAccessBuffer(generateData(r, size, smallRAFFactory));
HashResult[] hashes = getHashes(data);
data.pause();
MyCallback cb = new MyCallback();
InsertContext context = baseContext.clone();
context.earlyEncode = true;
KeysFetchingLocally keys = new MyKeysFetchingLocally();
SplitFileInserterStorage storage = new SplitFileInserterStorage(data, size, cb, null,