anchor.diff:  %% Local Functions
   %%=============================================================
   
  -
  +%%=============================================================
  +%% EUnit Functions
  +%%=============================================================
  +
  +init_per_testcase() ->
  +    {ok,SrvPid}=start(),SrvPid.
  +end_per_testcase(_InitResult) ->
  +    elips:shutdown(?MODULE).
  +
  +check_victim_alive() ->
  +    timer:sleep(30),
  +    ?assert(erlang:is_process_alive(whereis(?MODULE))).
  +
  +receive_result() ->
  +    receive
  +        Result -> Result
  +        after
  +            100 ->  throw(timeout)
  +    end.
  +
  +%% ensure_mbox_empty() ->
  +%%     receive
  +%%         Result -> throw({mbox_not_empty, Result})
  +%%         after
  +%%             1 ->  ok
  +%%     end.
  +
  +basic_test_() ->
  +    {foreach,fun init_per_testcase/0, fun end_per_testcase/1,
  +     [fun() ->
  +              check_victim_alive(),
  +              
  +              % Register self as a receiver of 'victim's messages
  +              register(tester, self()),
  +              
  +              %% Do ASSERTs
  +              
  +              % Send facts to an agent
  +              notify({a, has, b}),
  +              notify({b, has, c}),
  +              notify({c, is_a, dog}),
  +              ?assertMatch([{_A,has,_B},{_B,has,_C},{_C,is_a,dog}], 
  +                           receive_result()),
  +              
  +              % Send again & the same. Ensure rule will not be activated
  +              notify({a, has, b}),
  +              notify({b, has, c}),
  +              notify({c, is_a, dog}),
  +              ?assertThrow(timeout, receive_result()),
  +              
  +              % Send facts to an agent for the same pattern but in 'arbitrar' ordered
  +              notify({c1, is_a, dog}),
  +              notify({a1, has, b1}),
  +              notify({b1, has, c1}),
  +              ?assertMatch([{_A,has,_B},{_B,has,_C},{_C,is_a,dog}], 
  +                           receive_result()),
  +              
  +              % Send fact that must trigger(activate) a rule due to reuse of data already in WM
  +              notify({a2, has, b1}),
  +              ?assertMatch([{a2,has,_B},{_B,has,_C},{_C,is_a,dog}], 
  +                           receive_result()),
  +              
  +              %% Do RETIREs
  +              
  +              % Send fact that must be removed from WM and trigger(activate) a rule due to 
  +              notify({'-', {a2, has, b1}}),
  +              ?assertMatch({retire, [{a2,has,_B},{_B,has,_C},{_C,is_a,dog}]}, 
  +                           receive_result()),
  +              
  +              % Ensure that previous operation being repeated has no effect
  +              notify({'-', {a2, has, b1}}),
  +              ?assertThrow(timeout, receive_result()),
  +              
  +              % Ensure that some 'garbage' operations no effect
  +              notify({g, g, g, g}),
  +              ?assertThrow(timeout, receive_result()),
  +              
  +              notify({'-', {g1, g1, g1, g1} }),
  +              ?assertThrow(timeout, receive_result())
  +      end]}.
  +
  
positive.code:          code_change/3, 
           terminate/2]).
   
  -record(state,{}).
  
  %% 
  %% API Functions
  %%
  
  start() ->
      elips:start({local, ?MODULE}, ?MODULE, [], []).
  
  notify(Event) ->
      elips:notify(?MODULE, Event).
  
negative.code: % Initialize ELIPS state & insert some data to Working Memory (WM).
  % @end
  -spec init( Args :: term() ) -> elips:ok_reply() | ignore.
  init(ReplyPid) ->
      State=#state{reply_to=ReplyPid},
      {ok, 
       State, []}. 
  %%      [{assert, {Self, is_a, elips} },
  