anchor.diff:  
   
   %% @doc
  -%% Function: create_a_stream_on_index()/1
  +%% Function: create_a_stream_on_index/1
   %% Purpose: Creates a stream in the specified ES index.
   %% Args: Index - The index into which to add the stream.
   %% Returns: StreamId | {error, Reason}.
  
positive.code: %% 
  %% @end
  -spec vstream_subscribe_to_a_stream(_) -> ok | {error, term()}.
  vstream_subscribe_to_a_stream(_) ->
  
  	%% Create a stream in ?ES_INDEX
  	StreamId = create_a_stream_on_index(?ES_INDEX),
  	
  	%% Create virtual stream listening to our stream
  	VPid = create_virtual_stream("testID", [{stream, StreamId}], count),
  	
  	%% Create a publisher and consumer exchanges
  	OutExchange = list_to_binary("streams." ++ StreamId),
  	InExchange = list_to_binary("vstreams.testID"),
  	
  	%% Establish connection to RabbitMQ
  	{ok, Connection} =
  
negative.code: %%
  %% @end
  -spec start_and_terminate(_) -> ok | {error, term()}.
  start_and_terminate({VStreamId, StreamId1, _StreamId2}) ->
  	SupPid = whereis(vstream_sup),
  	Childrens1 = length(supervisor:which_children(vstream_sup)),
  	
  	virtual_stream_process_supervisor:add_child(VStreamId, [{stream, StreamId1}], [list_to_binary("count"), "2s"]),
  	%virtual_stream_process_supervisor:start_processes(),
  	%timer:sleep(5000),
  
  	Childrens2 = length(supervisor:which_children(vstream_sup)),
  	Pid = element(2, lists:nth(1, supervisor:which_children(vstream_sup))),
  	Info1 = is_process_alive(Pid),
  	Pid ! quit,
  	timer:sleep(1500),
  	Info2 = is_process_alive(Pid),
  	[?_assertEqual(true, is_pid(SupPid)),
  	 ?_assertEqual(0, Childrens1),
  	 ?_assertEqual(1, Childrens2),
  	 ?_assertEqual(true, Info1),
  	 ?_assertEqual(false, Info2)].
  
  
  