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:     rpc:call(Worker1, communicator, send, [ServerMsgInternal, SessionId]),
  
      % then
      ReceivedMessage =
          receive
              {ssl, _, Data} ->
                  server_messages:decode_msg(Data, 'ServerMessage')
          after timer:seconds(5) ->
              {error, timeout}
          end,
      ?assertEqual(ServerMessageProtobuf, ReceivedMessage),
      ok = ssl:close(Sock).
  
  client_communicate_test(Config) ->
  
negative.code: 
  unmock_identity(Workers) ->
      test_utils:mock_validate(Workers, identity),
      test_utils:mock_unload(Workers, identity).
  
  receive_server_message() ->
      receive_server_message([message_stream_reset]).
  
  receive_server_message(IgnoredMsgList) ->
      receive
          {_, _, Data} ->
              % ignore listed messages
              Msg = server_messages:decode_msg(Data, 'ServerMessage'),
              MsgType = element(1, Msg#'ServerMessage'.message_body),
              case lists:member(MsgType, IgnoredMsgList) of
                  true ->
                      receive_server_message(IgnoredMsgList);
                  false -> Msg
              end
      after timer:seconds(5) ->
          {error, timeout}
      end.
  