anchor.diff:              % Generate listener name
               ListenerID = "tcp" ++ integer_to_list(Port),
               Protocol = case UseSSL of
  -                           true -> ranch_ssl;
  -                           false -> ranch_tcp
  -                       end,
  +                true -> ranch_ssl;
  +                false -> ranch_tcp
  +            end,
               Opts = case UseSSL of
  -                       true ->
  -                           {ok, CaCertFile} = application:get_env(?APP_NAME, ca_cert_file),
  -                           {ok, CertFile} = application:get_env(?APP_NAME, cert_file),
  -                           {ok, KeyFile} = application:get_env(?APP_NAME, key_file),
  -                           [
  -                               {port, Port},
  -                               {cacertfile, CaCertFile},
  -                               {certfile, CertFile},
  -                               {keyfile, KeyFile}
  -                           ];
  -                       false ->
  -                           [{port, Port}]
  -                   end,
  +                true ->
  +                    {ok, CaCertFile} = application:get_env(?APP_NAME, ca_cert_file),
  +                    {ok, CertFile} = application:get_env(?APP_NAME, cert_file),
  +                    {ok, KeyFile} = application:get_env(?APP_NAME, key_file),
  +                    [
  +                        {port, Port},
  +                        {cacertfile, CaCertFile},
  +                        {certfile, CertFile},
  +                        {keyfile, KeyFile}
  +                    ];
  +                false ->
  +                    [{port, Port}]
  +            end,
               {ok, _} = ranch:start_listener(ListenerID, ?NUMBER_OF_ACCEPTORS,
                   Protocol, Opts, tcp_mock_handler, [Port, Packet]),
               HistoryEnabled = case Type of history -> true; _ -> false end,
  
positive.code: 
  handle_call({tcp_server_connection_count, Port}, _From, State) ->
      Reply = case get_endpoint(Port, State) of
                  undefined ->
                      {error, wrong_endpoint};
                  Endpoint ->
                      {ok, length(Endpoint#endpoint.connections)}
              end,
      {reply, Reply, State};
  
  handle_call(_Request, _From, State) ->
  
negative.code:     MsgHistory = Endpoint#endpoint.msg_history,
      HistoryEnabled = Endpoint#endpoint.history_enabled,
      NewHistory = case HistoryEnabled of
          true -> append_to_history(Data, MsgHistory);
          false -> MsgHistory
      end,
      NewEndpoint = Endpoint#endpoint{
          msg_count_per_msg = dict:update(Data, fun(Old) ->
              Old + 1 end, 1, MsgCountPerMsg),
  