anchor.diff:      T2 = os:timestamp(),
       Received = lists:map(
           fun(_) ->
  -            Data =
  -                receive
  -                    {_, _, Binary} -> Binary
  -                after
  -                    timer:seconds(5) -> {error, timeout}
  -                end,
  -            ?assertNotEqual({error, timeout}, Data),
  -            Msg = server_messages:decode_msg(Data, 'ServerMessage'),
  -            ?assertMatch(#'ServerMessage'{message_body = {pong, #'Pong'{}}}, Msg),
  -            {binary_to_integer(Msg#'ServerMessage'.message_id), Msg}
  +            Pong = receive_server_message(),
  +            ?assertMatch(#'ServerMessage'{message_body = {pong, #'Pong'{}}}, Pong),
  +            {binary_to_integer(Pong#'ServerMessage'.message_id), Pong}
           end, MsgNumbersBin),
       T3 = os:timestamp(),
   
  
positive.code:     lists:foldl(fun(E, N) ->
          % send ping & receive pong
          ok = ssl:send(Sock, E),
          Pong =
              receive
                  {ssl, _, Data} ->
                      server_messages:decode_msg(Data, 'ServerMessage')
              after
                  timer:seconds(5) -> {error, timeout}
              end,
  
          % validate pong
          BinaryN = integer_to_binary(N),
  
negative.code:     ok = Transport:send(Sock, TokenAuthMessageRaw),
  
      % then
      HandshakeResponse = receive_server_message(),
      ?assertMatch(#'ServerMessage'{message_body = {handshake_response, #'HandshakeResponse'{}}}, HandshakeResponse),
      #'ServerMessage'{message_body = {handshake_response,
          #'HandshakeResponse'{session_id = SessionId}}} = HandshakeResponse,
      setopts(Transport, Sock, ActiveOpt),
      {ok, {Sock, SessionId}}.
  
  