anchor.diff:  -include_lib("eunit/include/eunit.hrl").
   -ifdef(TEST).
   create_description_test() ->
  -    ?assertEqual({description, "Please, add the description here"}, create_entry(description, [])).
  +    ?assertEqual({description, "Please, add the description here"}, create_entry(description, undefined)).
   
  -create_thing_test() ->
  +create_config_test() ->
  +    application:load(horst),
       node_config:start(),
  -    create_thing("test", [{actor, sensor}, {driver, {test_driver, call_sensor},[]}]).
  +    Result = {thing,"Sample_Sensor1",
  +     [{type,sensor},
  +      {ets,true},
  +      {icon,"temp.png"},
  +      {id, "default"},
  +      {driver,{sample_driver,call_sensor},[{init,true},{data,[]}]},
  +      {activ,false},
  +      {timer,5000},
  +      {database,[]},
  +      {description,"Sample sensor for playing with"}]},
  +      ?assertEqual(Result, create_thing("Sample_Sensor1",[{type, sensor}, {ets, true}, {icon, "temp.png"}, 
  +        {driver, {sample_driver, call_sensor, [{init, true}, {data, []}]}}, {timer, 5000}, {description,"Sample sensor for playing with"}])). 
   -endif.
       
positive.code: create_entry(timer, Value) when is_integer(Value) ->
      {timer, Value};
  
  create_entry(database, []) ->
      {database, []};
  create_entry(database, Value) ->
      {database, Value};
  
  create_entry(description, []) ->
      {description, "Please, add the description here"};   
  create_entry(description, Value) ->
      {description, Value}.    
  
negative.code: %% --------------------------------------------------------------------
  -export([create_thing/2]).
  
  create_thing(Name, Config) ->
      Existing_config = get_config(),
      Thing_config = case is_entry(Name,  Existing_config) of 
          true -> lager:error("Entry with name : ~p already exists!", [config:get_value(thing, Existing_config)]),
                  [];
          false -> create_entries(Name, Config)
      end,
      {thing, Name, Thing_config}.
      
  create_entries(Name, Config) ->
      [create_entry(Key, config:get_value(Key, Config)) || Key <- [type, ets, icon, id,driver, activ, timer, database, description]].
      
  get_config() ->
      {Node, Config} = node_config:get_things_config(),
      Config.
  
  %% --------------------------------------------------------------------
  %%% Internal functions
  %% --------------------------------------------------------------------
  is_entry(Name, Config) ->
      lists:keymember(Name, 2, Config).     
  
  create_entry(type, sensor) ->
      {type, sensor};    
  
  create_entry(type, actor) ->
      {type, actor};
  create_entry(type, sensor) ->
      {type, sensor};    
      
  create_entry(id, undefined) ->
      create_entry(id, "default");
  create_entry(id, Value) ->
      {id, Value};
  