anchor.diff:  	DocId5 = lib_json:get_field(Body6,"_id"),
   	DocId6 = lib_json:get_field(Body7,"_id"),
   	DocId7 = lib_json:get_field(Body8,"_id"),
  -	refresh(),
  +	api_help:refresh(),
   	{ok, {{_Version9, 200, _ReasonPhrase9}, _Headers9, Body9}} = httpc:request(post, {"http://localhost:8000/streams/" ++ lib_json:to_string(DocId4) ++ "/data", [],"application/json", "{\"value\" : 2.0}"}, [], []),
   	{ok, {{_Version10, 200, _ReasonPhrase10}, _Headers10, Body10}} = httpc:request(post, {"http://localhost:8000/streams/" ++ lib_json:to_string(DocId5) ++ "/data", [],"application/json", "{\"value\" : 2.0}"}, [], []),
   	{ok, {{_Version11, 200, _ReasonPhrase11}, _Headers11, Body11}} = httpc:request(post, {"http://localhost:8000/streams/" ++ lib_json:to_string(DocId6) ++ "/data", [],"application/json", "{\"value\" : 2.0}"}, [], []),
   	{ok, {{_Version12, 200, _ReasonPhrase12}, _Headers12, Body12}} = httpc:request(post, {"http://localhost:8000/streams/" ++ lib_json:to_string(DocId7) ++ "/data", [],"application/json", "{\"value\" : 2.0}"}, [], []),
  -	refresh(),
  +	api_help:refresh(),
   	{ok, {{_Version13, 200, _ReasonPhrase13}, _Headers13, Body13}} = httpc:request(delete, {"http://localhost:8000/users/" ++ lib_json:to_string(DocId), []}, [], []),
  -	refresh(),
  +	api_help:refresh(),
   	{ok, {{_Version14, 200, _ReasonPhrase14}, _Headers14, Body14}} = httpc:request(get, {"http://localhost:8000/users/"++ lib_json:to_string(DocId) ++"/resources", []}, [], []),
   	{ok, {{_Version15, 200, _ReasonPhrase15}, _Headers15, Body15}} = httpc:request(get, {"http://localhost:8000/users/"++ lib_json:to_string(DocId) ++"/resources/"++ lib_json:to_string(DocId2) ++ "/streams", []}, [], []),
   	{ok, {{_Version16, 200, _ReasonPhrase16}, _Headers16, Body16}} = httpc:request(get, {"http://localhost:8000/users/"++ lib_json:to_string(DocId) ++"/resources/"++ lib_json:to_string(DocId3) ++ "/streams", []}, [], []),
  
positive.code: request(Method, Request) ->
      httpc:request(Method, Request, [], []).
  
  %% @doc
  %% Function: refresh/0
  %% Purpose: Help function to find refresh the sensorcloud index
  %% Returns: {ok/error, {{Version, Code, Reason}, Headers, Body}}
  %% @end
  refresh() ->
  	httpc:request(post, {"http://localhost:9200/sensorcloud/_refresh", [],"", ""}, [], []).
  
negative.code: 	Response1 = post_request(?USERS_URL, "application/json", 
  					 "{\"user_name\":\""++?TEST_NAME++"\"}"),
  	check_returned_code(Response1, 200),
  	api_help:refresh(),
  	?assertNotMatch({error, "no match"}, get_index_id(?TEST_NAME)).
  
  
  