os.close();
assertTrue(bucket.isRAMBucket());
assertEquals(len, bucket.size());
bucket.getInputStream().close();
TempRandomAccessBuffer raf = (TempRandomAccessBuffer) bucket.toRandomAccessBuffer();
bucket.free();
try {
raf.pread(0, new byte[len], 0, buf.length);
fail();
} catch (IOException e) {
// Ok.