public abstract <T> T readObject(final InputBuf inputBuf, final Class<T> clazz);
@Test
    public void readObjectTest() {
        final Serializer serializer = Serializers.getDefault();
        final KVOperation op = KVOperation.createPut(BytesUtil.writeUtf8("key"), BytesUtil.writeUtf8("value"));
        final byte[] bytes = serializer.writeObject(op);
        final ByteBuffer buffer = ByteBuffer.allocateDirect(bytes.length);
        buffer.put(bytes);
        BufferUtils.flip(buffer);

        final KVOperation op1 = serializer.readObject(bytes, KVOperation.class);
        final KVOperation op2 = serializer.readObject(buffer, KVOperation.class);

        assertArrayEquals(op1.getKey(), op.getKey());
        assertArrayEquals(op1.getValue(), op.getValue());
        assertEquals(op.getOp(), op.getOp());

        assertArrayEquals(op1.getKey(), op2.getKey());
        assertArrayEquals(op1.getValue(), op2.getValue());
        assertEquals(op.getOp(), op2.getOp());
    }