anchor.diff:  			?assert(meck:called(callback, handle_event, [some_event, undefined, undefined, data, state], '_'))
   		end},
   
  -		{"after state update, persistent version persists", fun() ->
  -			Gots = mnesia:dirty_read(pre_gen_entity, {callback, 1}),
  -			?assertEqual(1, length(Gots))
  -		end},
  -
   		{"removal of the entity by the callback", fun() ->
   			Self = self(),
   			meck:expect(callback, handle_event, fun(some_event, some_id, undefined, data, newstate) ->
  
positive.code: 
  	] end}.
  
  gen_event_stop_test_() ->
  	{foreach, fun() ->
  		_ = pre_gen_entity:ensure_mnesia_table(),
  		{ok, Pid} = gen_event:start(),
  		meck:new(callback, [non_strict]),
  		meck:expect(callback, init, fun(_) ->
  			{ok, state}
  		end),
  		pre_gen_entity:add_entity(Pid, 23, callback, [1,2,3]),
  		Pid
  	end,
  	fun(Pid) ->
  		case is_process_alive(Pid) of
  			true ->
  				gen_event:stop(Pid);
  			false ->
  				ok
  		end,
  		meck:unload(callback)
  	end,
  	[
  
  		fun(GE) -> {"callback can request no persistence", fun() ->
  			meck:expect(callback, stopping, fun(state) ->
  				ok
  			end),
  			ok = gen_event:stop(GE),
  			?assert(meck:called(callback, stopping, [state], '_')),
  			Got = mnesia:dirty_read(pre_gen_entity, {callback, 23}),
  			?assertEqual([], Got)
  		end} end,
  
  		fun(GE) -> {"callback can request persistence", fun() ->
  			meck:expect(callback, stopping, fun(state) ->
  				persist
  			end),
  			ok = gen_event:stop(GE),
  			?assert(meck:called(callback, stopping, [state], '_')),
  			Got = mnesia:dirty_read(pre_gen_entity, {callback, 23}),
  			?assertEqual([{pre_gen_entity, {callback, 23}, state, GE}], Got)
  		end} end,
  
  		fun(GE) -> {"callback can request peristence of different state", fun() ->
  			meck:expect(callback, stopping, fun(state) ->
  				{persist, new_state}
  			end),
  			ok = gen_event:stop(GE),
  			?assert(meck:called(callback, stopping, [state], '_')),
  			Got = mnesia:dirty_read(pre_gen_entity, {callback, 23}),
  			?assertEqual([{pre_gen_entity, {callback, 23}, new_state, GE}], Got)
  		end} end,
  
  		fun(GE) -> {"stored state id's can be retreived by GE pid", fun() ->
  			exit(GE, murdered),
  			Got = pre_gen_entity:retrieve_ids_by_manager(GE),
  			?assertEqual([{callback, 23}], Got)
  		end} end
  
  	]}.
  
  -endif.
  
negative.code: 			pre_gen_entity:notify(GE, some_event, 7, 7, data),
  			MsgReceived = receive
  				{pre_gen_entity, entity_removed, GE, {callback, 7}} ->
  					true
  			after 100 ->
  				false
  