anchor.diff:  %% @end
   -spec validate_request(message()) -> ok | {error, Reason :: term()}.
   validate_request(Request) when is_record(Request, sip_message) ->
  +    {request, Method, _} = Request#sip_message.start_line,
       CountFun =
           fun ({Name, Value}, Counts) ->
                    % assign tuple index for every header being counted
  
positive.code:         end,
  
      % Count headers
      case lists:foldl(CountFun, {0, 0, 0, 0, 0, 0}, Request#sip_message.headers) of
          C when C >= {1, 1, 1, 1, 1, 1}, % Each header must be exactly once,
                 C =< {1, 1, 1, 1, 1, a}  % except Via:, which must be at least once (atom > every possible number)
            -> ok;
          _ -> {error, invalid_headers}
      end.
  
negative.code: 
       % Header update functions
       ?_assertEqual(ViaMsgUp, update_top_header('via', Fun, ViaMsg)),
       ?_assertEqual(NoViaMsg, replace_top_header('via', Via1Up, NoViaMsg)),
  
       % Validation
       ?_assertEqual(ok, validate_request(ValidRequest)),
       ?_assertEqual({error, invalid_headers}, validate_request(InvalidRequest))
       ].
  -endif.
  