anchor.diff:                  ]}}
               ]}}]},
               #doc{atts = [
  -                #att{
  -                    name = <<"my_attachment.fu">>,
  -                    data = stub,
  -                    type = <<"application/awesome">>,
  -                    att_len = 45,
  -                    disk_len = 45,
  -                    revpos = nil
  -                },
  -                #att{
  -                    name = <<"noahs_private_key.gpg">>,
  -                    data = <<"I have a pet fish!">>,
  -                    type = <<"application/pgp-signature">>,
  -                    att_len = 18,
  -                    disk_len = 18,
  -                    revpos = 0
  -                }
  +                couch_att:new([
  +                    {name, <<"my_attachment.fu">>},
  +                    {data, stub},
  +                    {type, <<"application/awesome">>},
  +                    {att_len, 45},
  +                    {disk_len, 45},
  +                    {revpos, undefined}
  +                ]),
  +                couch_att:new([
  +                    {name, <<"noahs_private_key.gpg">>},
  +                    {data, <<"I have a pet fish!">>},
  +                    {type, <<"application/pgp-signature">>},
  +                    {att_len, 18},
  +                    {disk_len, 18},
  +                    {revpos, 0}
  +                ])
               ]},
               "Attachments are parsed correctly."
           },
  
positive.code:         {
              [attachments],
              #doc{atts = [
                  #att{
                      name = <<"stuff.txt">>,
                      type = <<"text/plain">>,
                      data = fun() -> <<"diet pepsi">> end,
                      revpos = 1,
                      att_len = 10,
                      disk_len = 10
                  },
                  #att{
                      name = <<"food.now">>,
                      type = <<"application/food">>,
                      revpos = 1,
                      data = <<"sammich">>
                  }
              ]},
              {[
                  {<<"_id">>, <<>>},
  
negative.code:         ({Options, Doc, EJson, Msg}) ->
              {Msg, ?_assertMatch(EJson, couch_doc:to_json_obj(Doc, Options))}
      end, Cases).
  