anchor.diff:      Req = ['STR', {'Termination-Cause', ?LOGOUT}],
       Ref = make_ref(),
       ok = call(Config, Req, [{extra, [{self(), Ref}]}, detach]),
  -    Ans = receive {Ref, T} -> T end,
  -    ['STA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _]
  -        = Ans.
  +    #{':name' := 'STA',
  +      'Session-Id' := _,
  +      'Result-Code' := ?SUCCESS}
  +        = receive {Ref, T} -> T end.
   
   %% Send a request which can't be encoded and expect {error, encode}.
   send_encode_error(Config) ->
  
positive.code: 
  %% A common match when receiving answers in a client.
  -define(answer_message(SessionId, ResultCode),
          ['answer-message',
           {'Session-Id', SessionId},
           {'Origin-Host', _},
           {'Origin-Realm', _},
           {'Result-Code', ResultCode}
           | _]).
  -define(answer_message(ResultCode),
          ?answer_message(_, ResultCode)).
  
  %% Config for diameter:start_service/2.
  -define(SERVICE(Name, Decode),
  
negative.code: %% Send a bad version and check that we get 5011.
  send_unsupported_version(Config) ->
      Req = ['STR', {'Termination-Cause', ?LOGOUT}],
      #{':name' := 'STA',
        'Session-Id' := _,
        'Result-Code' := ?UNSUPPORTED_VERSION}
          = call(Config, Req).
  
  %% Send a request containing an AVP length > data size.
  