Output output = new ByteBufferOutput(buffer);
Input input = new ByteBufferInput(buffer);
Class<? extends Serializer> serializer = entryType.getAnnotation(EntryType.class).serializer();
kryo.register(entryType, serializer.newInstance(), entryType.getAnnotation(EntryType.class) .id());
kryo.writeClassAndObject(output, entry);
T result = (T) kryo.readClassAndObject(input);
Assert.assertEquals(entry, result);
}
}