anchor.diff:  	    Msg = io_lib:format("response ~p did not result in blacklisting", [Status]),
   	    throw({error, lists:flatten(Msg)})
       end.
  +
  +
  +%% compare two records element by element and give good information on where they
  +%% are not equal
  +test_compare_records(R1, R2, Ignore) when is_tuple(R1), is_tuple(R2), is_list(Ignore) ->
  +    test_compare_records2(tuple_to_list(R1), tuple_to_list(R2), Ignore).
  +
  +test_compare_records2([RecName | L1], [RecName | L2], Ignore) when is_list(L1), is_list(L2), length(L1) == length(L2) ->
  +    test_compare_records3(L1, L2, RecName, test_record_info(RecName), Ignore).
  +
  +test_compare_records3([Elem | L1], [Elem | L2], RecName, [ThisField | Fields], Ignore) ->
  +    %% element at first position matches
  +    %%io:format("Record ~p#~p matches~n", [RecName, ThisField]),
  +    case lists:member(ThisField, Ignore) of
  +	true ->
  +	    Msg = io_lib:format("Record ~p#~p NOT changed", [RecName, ThisField]),
  +	    {error, lists:flatten(Msg), Elem};
  +	false ->
  +	    test_compare_records3(L1, L2, RecName, Fields, Ignore)
  +    end;
  +test_compare_records3([Elem1 | L1], [Elem2 | L2], RecName, [ThisField | Fields], Ignore) ->
  +    case lists:member(ThisField, Ignore) of
  +	true ->
  +	    %%io:format("Record ~p#~p does NOT match, but we ignore that : ~p /= ~p~n",
  +	    %%	      [RecName, ThisField, Elem1, Elem2]),
  +	    test_compare_records3(L1, L2, RecName, Fields, Ignore);
  +	false ->
  +	    Msg = io_lib:format("Record ~p#~p does NOT match", [RecName, ThisField]),
  +	    {error, lists:flatten(Msg), Elem1, Elem2}
  +    end;
  +test_compare_records3([], [], _RecName, [], _Ignore) ->
  +    ok.
  +
  +test_record_info(state) ->
  +    record_info(fields, state).
  
positive.code:     autotest:mark(?LINE, "process_timer2/3 {invite_expire} - 1.2"),
      %% verify new state
      {408, "Request Timeout"} = InviteExpire_State_out#state.response,
      InviteExpire_State = InviteExpire_State_out#state{response     = undefined,
  						      final_r_sent = false,
  						      sipstate     = calling,
  						      timerlist    = InviteExpire_State#state.timerlist
  						     },
  
      autotest:mark(?LINE, "process_timer2/3 {invite_expire} - 1.3"),
      %% verify that report_to was notified
  
negative.code:     100 = (SipMessage_State1_out#state.response)#response.status,
      1 = SipMessage_State1_out#state.res_count,
      "Testing" = (SipMessage_State1_out#state.response)#response.reason,
      ok = test_compare_records(SipMessage_State1, SipMessage_State1_out,
  			      [sipstate, response, res_count]),
  
      autotest:mark(?LINE, "gen_server:cast() {sipmessage, ...} - 2.1"),
      %% test that if we have a cancelled INVITE transaction in state 'calling', and receive
  