anchor.diff:      (assert-true (= 123 (value (inner (rec-lazy restored-cntnr)))))))
   
   (deftest test-write-lazy-fields (lazy-tests)
  -  (let* ((proto (proto-impl:make-object container
  -                                        :value-before 10
  -                                        :inner (proto-impl:make-object inner :value 42)
  -                                        :value-after 20))
  +  (let* ((proto (make-container
  +                 :value-before 10
  +                 :inner (make-inner :value 42)
  +                 :value-after 20))
            (bytes (proto:serialize-object-to-bytes proto)))
       ;; Updating the lazy field with a new value will invalidate the encoded field.
       (let ((restored (proto:deserialize-object-from-bytes 'container bytes)))
  -      (setf (inner restored) (proto-impl:make-object inner :value 1234))
  +      (setf (inner restored) (make-inner :value 1234))
         (assert-true (null (proto:encoded-field restored 'inner)))
         ;; If serialized and deserialized again, the new value should be found.
         (let ((updated-restored
  
positive.code:         (assert-true (= 5678 (value (inner updated-restored))))))))
  
  (deftest test-required-lazy (lazy-tests)
    (let* ((proto (proto-impl:make-object required-lazy
                                          :inner (proto-impl:make-object inner :value 42)))
           (bytes (proto:serialize-object-to-bytes proto))
           (restored (proto:deserialize-object-from-bytes 'required-lazy bytes)))
      (assert-true (= 42 (value (inner restored))))))
  
  (deftest test-repeated-lazy (lazy-tests)
    (let* ((inners (loop for i from 0 below 5 collect (proto-impl:make-object inner :value i)))
           (proto (proto-impl:make-object repeated-lazy :inners inners))
           (bytes (proto:serialize-object-to-bytes proto))
           (restored (proto:deserialize-object-from-bytes 'repeated-lazy bytes))
           (encoded-bytes (proto:encoded-field restored 'inners)))
  
negative.code:     (assert-true (proto-impl::proto-lazy-p inner-field))))
  
  (deftest test-lazy-field-serialize (lazy-tests)
    (let* ((proto (make-container
                   :value-before 10
                   :inner (make-inner :value 42)
                   :value-after 20))
           (bytes (proto:serialize-object-to-bytes proto))
           (restored (proto:deserialize-object-from-bytes 'container bytes)))
      ;; The original proto doesn't have encoded field.
  