public static byte[] encodeCommand(Object obj) {
        try {
            return SerializerManager.getSerializer(SerializerManager.Hessian2).serialize(obj);
        } catch (final CodecException e) {
            throw new IllegalStateException(e);
        }
    }
encode the command,returns the byte array.
@param obj
@return
jraft-test/src/main/java/com/alipay/sofa/jraft/test/atomic/command/CommandCodec.java