anchor.diff:      Via2 = sip_headers:via(tcp, {"127.0.0.2", 15060}, [{ttl, 4}]),
       Via1Up = sip_headers:via(udp, {"localhost", 5060}, []),
   
  +    [% Header lookup functions
  +     ?_assertEqual(Via1, header_top_value('via', #sip_request{headers = [{'via', [Via1, Via2]}]})),
  +     ?_assertEqual([Via1, Via2, Via1Up], header_values('via', #sip_request{headers = [{'via', Via1}, {'via', [Via2, Via1Up]}]})),
  +
  +     ?_assertEqual(true, has_header(via, #sip_request{headers = [{via, [Via1, Via2]}]})),
  +     ?_assertEqual(false, has_header(via, #sip_request{headers = [{'content-length', 5}]})),
  +
  +     % Fold Via's (extract hostnames in reverse order)
  +     ?_assertEqual(["localhost", "127.0.0.2", "127.0.0.1"],
  +                   foldl_headers(via, fun (#sip_hdr_via{host = Host}, Acc) -> [Host | Acc] end, [],
  +                                 #sip_request{headers = [{'via', Via1}, {'via', [Via2, Via1Up]}]}))
  +     ].
  +
  +-spec validation_test_() -> list().
  +validation_test_() ->
       URI = <<"sip@nowhere.invalid">>,
       ValidRequest =
           #sip_request{method = 'OPTIONS',
  
positive.code: parse_all_headers(Msg) when is_record(Msg, sip_request); is_record(Msg, sip_response) ->
      Headers = [{Name, sip_headers:parse(Name, Value)} || {Name, Value} <- headers(Msg)],
      set_headers(Msg, Headers).
  
  %%-----------------------------------------------------------------
  %% Internal functions
  
negative.code: %%-----------------------------------------------------------------
  %% Exports
  %%-----------------------------------------------------------------
  -export([method/1]).
  -export([validate_request/1, validate_response/1]).
  -export([parse_stream/2, parse_datagram/1, parse_all_headers/1, to_binary/1]).
  -export([create_ack/2, create_response/2, create_response/3]).
  -export([update_top_header/3, replace_top_header/3, append_header/3]).
  -export([header_values/2, header_top_value/2, has_header/2]).
  -export([with_branch/2, foldl_headers/4]).
  