anchor.diff:  	    Msg = io_lib:format("Did not receive the expected signal : tuple ~p", [Key]),
   	    erlang: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, ShouldChange) when is_tuple(R1), is_tuple(R2), is_list(ShouldChange) ->
  +    RecName = element(1, R1),
  +    Fields = test_record_info(RecName),
  +    autotest_util:compare_records(R1, R2, ShouldChange, Fields).
  +
  +%% add more records here when needed
  +test_record_info(state) ->
  +    record_info(fields, state).
  
positive.code:     autotest:mark(?LINE, "loop_receive_once/2 - CANCEL received 2.1"),
      %% check cancel when already cancelled
      self() ! {servertransaction_cancelled, self(), [{"Reason", ["unit test"]}]},
      {ok, State1_Res} = loop_receive_once(State1_Res, util:timestamp() + 10),
  
      autotest:mark(?LINE, "loop_receive_once/2 - CANCEL received 2.2"),
      %% check that we don't receive any signals in this case
      test_no_more_messages(),
  
      ok.
  
  
negative.code:     autotest:mark(?LINE, "loop_receive_once/2 - CANCEL received 1.2"),
      %% check returned state
      true = State1_Res#state.cancelled,
      ok = test_compare_records(State1, State1_Res, [cancelled]),
  
      autotest:mark(?LINE, "loop_receive_once/2 - CANCEL received 1.3"),
      %% check signals received
  