anchor.diff:      Opts = [{port, ServerPort}, {host, ServerHost}], 
       Self = self(),
       [
  -     #command{id   = 1,
  -	      desc = "Command sequence init",
  -	      cmd  = fun(State) -> 
  -			     {ok, State#client{parent = Self}} 
  -		     end},
  -
  -     #command{id   = 2,
  -	      desc = "Start transport",
  -	      cmd  = fun(State) -> 
  -			     client_start_transport(State) 
  -		     end},
  -
  -     #command{id   = 3,
  -	      desc = "Await continue",
  -	      cmd  = fun(State) -> 
  -			     client_await_continue_signal(State, 5000) 
  -		     end},
  -
  -     #command{id   = 4,
  -	      desc = "Connect",
  -	      cmd  = fun(State) -> 
  -			     client_connect(State, Opts) 
  -		     end},
  -
  -     #command{id   = 5,
  -	      desc = "Send initial message (ping)",
  -	      cmd  = fun(State) -> 
  -			     client_send_message(State, "ping") 
  -		     end},
  -
  -     #command{id   = 6,
  -	      desc = "Await reply (pong) to initial message",
  -	      cmd  = fun(State) -> 
  -			     client_await_message(State, "pong", 1000) 
  -		     end},
  -
  -     #command{id   = 7,
  -	      desc = "Await message (hejsan)",
  -	      cmd  = fun(State) -> 
  -			     client_await_message(State, "hejsan", 5000) 
  -		     end},
  -
  -     #command{id   = 8,
  -	      desc = "Send reply (hoppsan) to message",
  -	      cmd  = fun(State) -> 
  -			     client_send_message(State, "hoppsan") 
  -		     end},
  -
  -     #command{id   = 9,
  -	      desc = "Await nothing before disconnecting",
  -	      cmd  = fun(State) -> 
  -			     client_await_nothing(State, 1000) 
  -		     end},
  -
  -     #command{id   = 10,
  -	      desc = "Disconnect",
  -	      cmd  = fun(State) -> 
  -			     client_disconnect(State) 
  -		     end},
  -
  -     #command{id   = 11,
  -	      desc = "Await nothing before stopping transport",
  -	      cmd  = fun(State) -> 
  -			     client_await_nothing(State, 1000) 
  -		     end},
  -
  -     #command{id   = 12,
  -	      desc = "Stop transport",
  -	      cmd  = fun(State) -> 
  -			     client_stop_transport(State) 
  -		     end}
  +     #{id   => 1,
  +       desc => "Command sequence init",
  +       cmd  => fun(State) -> 
  +		       {ok, State#{parent => Self}} 
  +	       end},
  +
  +     #{id   => 2,
  +       desc => "Start transport",
  +       cmd  => fun(State) -> 
  +		       client_start_transport(State) 
  +	       end},
  +
  +     #{id   => 3,
  +       desc => "Await continue",
  +       cmd  => fun(State) -> 
  +		       client_await_continue_signal(State, 5000) 
  +	       end},
  +
  +     #{id   => 4,
  +       desc => "Connect",
  +       cmd  => fun(State) -> 
  +		       client_connect(State, Opts) 
  +	       end},
  +
  +     #{id   => 5,
  +       desc => "Send initial message (ping)",
  +       cmd  => fun(State) -> 
  +		       client_send_message(State, "ping") 
  +	       end},
  +
  +     #{id   => 6,
  +       desc => "Await reply (pong) to initial message",
  +       cmd  => fun(State) -> 
  +		       client_await_message(State, "pong", 1000) 
  +	       end},
  +
  +     #{id   => 7,
  +       desc => "Await message (hejsan)",
  +       cmd  => fun(State) -> 
  +		       client_await_message(State, "hejsan", 5000) 
  +	       end},
  +
  +     #{id   => 8,
  +       desc => "Send reply (hoppsan) to message",
  +       cmd  => fun(State) -> 
  +		       client_send_message(State, "hoppsan") 
  +	       end},
  +
  +     #{id   => 9,
  +       desc => "Await nothing before disconnecting",
  +       cmd  => fun(State) -> 
  +		       client_await_nothing(State, 1000) 
  +	       end},
  +
  +     #{id   => 10,
  +       desc => "Disconnect",
  +       cmd  => fun(State) -> 
  +		       client_disconnect(State) 
  +	       end},
  +
  +     #{id   => 11,
  +       desc => "Await nothing before stopping transport",
  +       cmd  => fun(State) -> 
  +		       client_await_nothing(State, 1000) 
  +	       end},
  +
  +     #{id   => 12,
  +       desc => "Stop transport",
  +       cmd  => fun(State) -> 
  +		       client_stop_transport(State) 
  +	       end}
       ].
   
   
  
positive.code: sendreceive(suite) ->
      [];
  sendreceive(Config) when is_list(Config) ->
      put(sname, "sendreceive"),
      p("BEGIN TEST-CASE"), 
  
      process_flag(trap_exit, true),
  
      p("create nodes"),
      ServerNode = make_node_name(server),
      ClientNode = make_node_name(client),
      Nodes = [ServerNode, ClientNode], 
      ok = megaco_test_lib:start_nodes(Nodes, ?FILE, ?LINE),
  
      %% Create command sequences
      p("create command sequences"),
      ServerPort = 2944, 
  
negative.code: 
      %% Start the test procs used in the test-case, one for each node
      p("start command handlers"),
      %% Server = server_start_command_handler(ServerNode, ServerCmds),
      Server = ?CH:start(ServerNode, ServerCmds, #{}, "server"),
      p("server command handler started: ~p", [Server]),
      %% Client = client_start_command_handler(ClientNode, ClientCmds),
      Client = ?CH:start(ClientNode, ClientCmds, #{}, "client"),
      p("client command handler started: ~p", [Client]),
  
      await_server_listening(Server, Client),
      
      %% ok = await_command_handler_completion([Server, Client], timer:seconds(20)),
      ok = ?CH:await_completion([Server, Client], ?SECS(20)),
      p("done"),
      ok.
  
  