anchor.diff:  	U3R1Stream1 = lib_json:get_field(Body22,"_id"),
   	
   	%% Add random data between min and max for the streams
  -	random_data(15,0.0,15.0,U3R1Stream1),
  +	sinus_random_data(15,U3R1Stream1,1000),
   
   	%% Create resources for user4
   	{ok, {{_Version23, 200, _ReasonPhrase23}, _Headers23, Body23}} = httpc:request(post, {"http://localhost:8000/resources", [],"application/json", "{\"user_id\":\""++ User4 ++"\",\"name\":\"Resource1\",\"tags\":\"[water-level,Uppsala]\",\"description\":\"Water-level in Uppsala\",\"type\":\"Water-level\",\"manufacturer\":\"Ericsson\",\"model\":\"WLA099\",\"make\":\"\",\"serial\":\"AACV223\",\"location\":\"59.8581,17.6447\",\"active\":\"true\",\"uri\":\"http://uppsala.com\",\"polling_freq\":\"60\",\"creation_date\":\"2013-10-05\"}"}, [], []),
  
positive.code: -export([add_data/0]).
  
  %% @doc
  %% Function: random_data/4
  %% Purpose: Used to add a given amount of datapoints with random 
  %%          values to the history of the given stream
  %% Returns: ok 
  %%
  %% Side effects: creates datapoints in elastich search
  %% @end
  -spec random_data(Amount::integer(),Min::float(),Max::float(),StreamId::string()) -> ok.
  
  random_data(0,_Min,_Max,_StreamId) ->
  	ok;
  random_data(Amount,Min,Max,StreamId) ->
  	{A1,A2,A3} = now(),
  	random:seed(A1, A2, A3),
  	Value = random:uniform(),
  	UsedValue = float_to_list(Min+(Value*(Max-Min)),[{decimals,1}]),
  	case Amount < 10 of
  		true -> Time = "0" ++ integer_to_list(Amount);
  		false -> Time = integer_to_list(Amount)
  	end,
  	%% Unsure if this is how the datapoints should look
  	JSON = "{\"stream_id\":\""++ StreamId++"\",\"timstap\":\"2013-10-05T0105" ++ Time ++ ".0000\",\"value\":"++ UsedValue ++"}",
  	{ok, {{_Version, _Code, _ReasonPhrase}, _Headers, _Body}} = httpc:request(post, {"http://localhost:8000/streams/" ++ StreamId ++ "/data", [],"application/json", JSON}, [], []),
  	random_data(Amount-1,Min,Max,StreamId).
  
  
  %% @doc
  %% Function: add_data/0
  
negative.code: 	U1R3Stream2 = lib_json:get_field(Body14,"_id"),
  	
  	%% Add random data between min and max for the streams
  	sinus_random_data(15,U1R3Stream1,1000),
  	sinus_random_data(15,U1R3Stream2,1000),
  	
  	
  	
  