anchor.diff:           end_per_suite/1]).
   
   %% testcases
  --export([reopen/1, reopen/4, reopen/6]).
  +-export([reopen/0, reopen/1, reopen/4, reopen/6,
  +         suspect/1, suspect/4,
  +         okay/1, okay/4]).
   
   -export([id/1,    %% jitter callback
  -         run1/1]).
  +         run1/1,
  +         abuse/1,
  +         abuse/2]).
   
   %% diameter_app callbacks
   -export([peer_up/3,
  
positive.code: recv_reopen(listen, Ref) ->
      {_, reopen} = ?WD_EVENT(Ref).
  
  %% reg/4
  %%
  %% Lookup the pid of the transport process and publish a term for
  %% send/2 to lookup.
  reg(Type, Ref, SvcName, T) ->
      TPid = tpid(Type, Ref, diameter:service_info(SvcName, transport)),
      true = diameter_reg:add_new({?MODULE, TPid, T}).
  
  %% tpid/3
  
  tpid(connect, Ref, [[{ref, Ref},
                       {type, connect},
                       {options, _},
                       {watchdog, _},
                       {peer, _},
                       {apps, _},
                       {caps, _},
                       {port, [{owner, TPid} | _]}
                       | _]]) ->
      TPid;
  
  tpid(listen, Ref, [[{ref, Ref},
                      {type, listen},
                      {options, _},
                      {accept, As}
                      | _]]) ->
      [[{watchdog, _},
        {peer, _},
        {apps, _},
  
negative.code: 
  %% Test the watchdog state machine for the required failover, failback
  %% and reopen behaviour by examining watchdog events.
  
  reopen() ->
      [{timetrap, {minutes, 5}}]. %% 20 watchdogs @ 15 sec
  
  reopen(_) ->
      [] = run([[reopen, T, W, N, M]
  