anchor.diff:  	#acc_balance{total_balance = BytesTotalAmount}
   			= lists:keyfind(octets, #acc_balance.units, AccBalanceRecords).
   
  -notify_accumulated_threshold() ->
  -	[{userdata, [{doc, "Notify accumulated credit threshold"}]}].
  -
  -notify_accumulated_threshold(Config) ->
  -	HostUrl = ?config(host_url, Config),
  -	CollectionUrl = HostUrl ++ ?PathBalanceHub,
  -	ListenerPort = ?config(listener_port, Config),
  -	ListenerServer = "http://localhost:" ++ integer_to_list(ListenerPort),
  -	Callback = ListenerServer ++ "/listener/"
  -			++ atom_to_list(?MODULE) ++ "/notifyaccumulatedthreshold",
  -	RequestBody = "{\n"
  -			++ "\t\"callback\": \"" ++ Callback ++ "\",\n"
  -			++ "}\n",
  -	ContentType = "application/json",
  -	Accept = {"accept", "application/json"},
  -	Request1 = {CollectionUrl, [Accept, auth_header()], ContentType, RequestBody},
  -	{ok, {{_, 201, _}, _, _}} = httpc:request(post, Request1, [], []),
  +query_accumulated_balance_notification() ->
  +	[{userdata, [{doc, "Query accumulated balance notification"}]}].
  +
  +query_accumulated_balance_notification(Config) ->
   	PackagePrice = 5000000,
   	PackageSize = 100000000,
   	P1 = #price{name = ocs:generate_identity(), type = usage, units = octets,
   			size = PackageSize, amount = PackagePrice},
   	OfferId = add_offer([P1], 4),
  -	receive
  -		Input1 ->
  -			{struct, OfferEvent} = mochijson:decode(Input1),
  -			{_, "ProductOfferingCreationNotification"}
  -					= lists:keyfind("eventType", 1, OfferEvent)
  -	end,
   	{ok, #product{id = ProdRef}} = ocs:add_product(OfferId, [], []),
  -	receive
  -		Input2 ->
  -			{struct, ProductEvent} = mochijson:decode(Input2),
  -			{_, {struct, ProductList}} = lists:keyfind("event", 1, ProductEvent),
  -			{_, ProdRef} = lists:keyfind("id", 1, ProductList)
  -	end,
   	RA1 = 50000000,
  -	BId1 = add_bucket(ProdRef, cents, RA1),
  -	receive
  -		Input3 ->
  -			{struct, BalanceEvent1} = mochijson:decode(Input3),
  -			{_, {struct, BalanceList1}} = lists:keyfind("event", 1, BalanceEvent1),
  -			{_, BId1} = lists:keyfind("id", 1, BalanceList1)
  -	end,
  +	_BId1 = add_bucket(ProdRef, cents, RA1),
   	RA2 = 100000000,
   	BId2 = add_bucket(ProdRef, cents, RA2),
  -	receive
  -		Input4 ->
  -			{struct, BalanceEvent2} = mochijson:decode(Input4),
  -			{_, {struct, BalanceList2}} = lists:keyfind("event", 1, BalanceEvent2),
  -			{_, BId2} = lists:keyfind("id", 1, BalanceList2)
  -	end,
  +	HostUrl = ?config(host_url, Config),
  +	CollectionUrl = HostUrl ++ ?PathBalanceHub,
  +	ListenerPort = ?config(listener_port, Config),
  +	ListenerServer = "http://localhost:" ++ integer_to_list(ListenerPort),
  +	Callback = ListenerServer ++ "/listener/"
  +			++ atom_to_list(?MODULE) ++ "/queryaccumulatedbalancenotification",
  +	RequestBody = "{\n"
  +			++ "\t\"callback\": \"" ++ Callback ++ "\",\n"
  +			++ "}\n",
  +	ContentType = "application/json",
  +	Accept = {"accept", "application/json"},
  +	Request1 = {CollectionUrl, [Accept, auth_header()], ContentType, RequestBody},
  +	{ok, {{_, 201, _}, _, _}} = httpc:request(post, Request1, [], []),
   	Threshold = 100,
   	Query = "?totalBalance.units=cents&totalBalance.amount.lt="
   			++ integer_to_list(Threshold),
  
positive.code: 		TestCase == notify_delete_bucket;
  		TestCase == notify_rating_deleted_bucket;
  		TestCase == notify_accumulated_balance; TestCase == notify_product_charge;
  		TestCase == notify_accumulated_threshold; TestCase == query_bucket_notification;
  		TestCase == notify_create_product; TestCase == notify_delete_product;
  		TestCase == query_product_notification;
  		TestCase == notify_create_service; TestCase == notify_delete_service;
  
negative.code: 	mod_esi:deliver(SessionID, "status: 201 Created\r\n\r\n"),
  	notify_accumulated_balance ! Input.
  
  -spec queryaccumulatedbalancenotification(SessionID :: term(), Env :: list(),
  		Input :: string()) -> any().
  %% @doc Notification callback for query_accumulated_balance_notification
  %% test case.
  queryaccumulatedbalancenotification(SessionID, _Env, Input) ->
  	mod_esi:deliver(SessionID, "status: 201 Created\r\n\r\n"),
  	query_accumulated_balance_notification ! Input.
  
  -spec notifyproductcharge(SessionID :: term(), Env :: list(),
  		Input :: string()) -> any().
  