@Test
public void testSerialize() throws IOException, StorageFormatException, ResumeFailedException, GeneralSecurityException, ClassNotFoundException {
File tempFile = File.createTempFile("test-storeto", ".tmp", base);
byte[] buf = new byte[4096];
Random r = new Random(1267612);
r.nextBytes(buf);
FileRandomAccessBuffer rafw = new FileRandomAccessBuffer(tempFile, buf.length+types[0].headerLen, false);
EncryptedRandomAccessBuffer eraf = new EncryptedRandomAccessBuffer(types[0], rafw, secret, true);
eraf.pwrite(0, buf, 0, buf.length);
byte[] tmp = new byte[buf.length];
eraf.pread(0, tmp, 0, buf.length);