anchor.diff:    {stop, Reason :: term(), NewState :: #state{}}).
   handle_call({get}, _From, State) ->
     do_get_devices(State);
  -handle_call({get, UniqueId}, _From, State) ->
  +handle_call({get, Id}, _From, State) when is_integer(Id) ->
  +  do_get_device_by_id(State, Id);
  +handle_call({get, UniqueId}, _From, State) when is_binary(UniqueId) ->
     do_get_device_by_uid(State, UniqueId);
   handle_call({create, Device}, _From, State) ->
     do_create_device(State, Device);
  
positive.code: -export([
    get/0,
    get_by_uid/1,
    create/1,
    update/1,
    delete/1
  
negative.code: 
  do_get_devices(State = #state{cache = Cache}) ->
    {reply, {ok, ets:tab2list(Cache)}, State}.
  
  do_get_device_by_id(State = #state{cache = Cache}, Id) ->
    case ets:lookup(Cache, Id) of
      [] ->
        {reply, {error, <<"Access is denied">>}, State};
      [Item|_] ->
        {reply, {ok, Item}, State}
    end.
  
  do_get_device_by_uid(State = #state{cache = Cache}, Uid) ->
    Match = ets:fun2ms(fun(Device = #device{uniqueId = UniqueId}) when UniqueId =:= Uid -> Device end),
  