@Test
public void testReadObject() throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
KryoOutstream ooo = new KryoOutstream(bos);
Bean q = new Bean(5, "Another", 523212, new Date(1338008328334L));
Benchmark bench = Benchmark.makeBenchmark();
ooo.writeObject(bench);
ooo.writeObject(q);
ooo.close();
byte[] bs = bos.toByteArray();
System.out.println("L " + bs.length);
// ----------
KryoInstream iii = new KryoInstream(new ByteArrayInputStream(bs));
Benchmark cp = iii.readObject(Benchmark.class);
Bean t = iii.readObject(Bean.class);
System.out.println("I " + t.getId());
assertEquals(t.getBirth(), q.getBirth());
assertEquals(bench, cp);
iii.close();