anchor.diff:      Reason ->
         {reply, Reason, State}
     end.
  +
  +do_delete_device(State = #state{cache = Cache}, DeviceModel) ->
  +  case em_storage:delete_device(DeviceModel) of
  +    {ok, Device} ->
  +      case ets:delete(Cache, Device#device.id) of
  +        true ->
  +          {reply, {ok, Device}, State};
  +        false -> {reply, {error, <<"Error sync in devices cache">>}, State}
  +      end;
  +    Reason ->
  +      {reply, Reason, State}
  +  end.
positive.code: -spec(update(Device :: #device{}) -> {ok, #device{}} | {error, string()}).
  update(Device) ->
    gen_server:call(?SERVER, {update, Device}).
  
  %%--------------------------------------------------------------------
  %% @doc
  
negative.code:   do_create_device(State, Device);
  handle_call({update, Device}, _From, State) ->
    do_update_device(State, Device);
  handle_call({delete, Device}, _From, State) ->
    do_delete_device(State, Device);
  handle_call(_Request, _From, State) ->
    {reply, ok, State}.
  
  