anchor.diff:  		TestCase == notify_delete_bucket;
   		TestCase == notify_rating_deleted_bucket;
   		TestCase == notify_accumulated_balance_threshold;
  -		TestCase == notify_product_charge;
   		TestCase == query_accumulated_balance_notification;
   		TestCase == query_bucket_notification;
   		TestCase == notify_create_product; TestCase == notify_delete_product;
  +		TestCase == notify_product_charge;
   		TestCase == query_product_notification;
   		TestCase == notify_create_service; TestCase == notify_delete_service;
   		TestCase == query_service_notification;
  
positive.code: 	notify_accumulated_balance_threshold, query_accumulated_balance_notification,
  	query_bucket_notification,
  	post_hub_product, delete_hub_product, notify_create_product,
  	notify_delete_product, query_product_notification, post_hub_service,
  	delete_hub_service,
  	notify_create_service, notify_delete_service, query_service_notification,
  	post_hub_user, delete_hub_user, post_hub_catalog, delete_hub_catalog,
  	notify_create_offer, notify_delete_offer, query_offer_notification,
  	notify_insert_gtt, notify_delete_gtt, query_gtt_notification,
  	notify_add_pla, notify_delete_pla, query_pla_notification,
  	post_hub_inventory, delete_hub_inventory, notify_product_charge,
  	oauth_authentication].
  
  %%---------------------------------------------------------------------
  
negative.code: 	end,
  	#product{} = ocs_rest_res_product:inventory(ProductStuct2).
  
  notify_product_charge() ->
  	[{userdata, [{doc, "Receive product charged notification"}]}].
  
  notify_product_charge(Config) ->
  	HostUrl = ?config(host_url, Config),
  	CollectionUrl = HostUrl ++ ?PathProductHub,
  	ListenerPort = ?config(listener_port, Config),
  	ListenerServer = "http://localhost:" ++ integer_to_list(ListenerPort),
  	Callback = ListenerServer ++ "/listener/"
  			++ atom_to_list(?MODULE) ++ "/notifyproductcharge",
  	RequestBody = "{\n"
  			++ "\t\"callback\": \"" ++ Callback ++ "\",\n"
  			++ "}\n",
  	ContentType = "application/json",
  	Accept = {"accept", "application/json"},
  	Request = {CollectionUrl, [Accept, auth_header()], ContentType, RequestBody},
  	{ok, {{_, 201, _}, _, _}} = httpc:request(post, Request, [], []),
  	SD = erlang:system_time(?MILLISECOND),
  	Alteration = #alteration{name = ocs:generate_identity(), start_date = SD,
  			type = usage, period = undefined,
  			units = octets, size = 100000000000, amount = 0},
  	Price = #price{name = ocs:generate_identity(), start_date = SD,
  			type = recurring, period = monthly,
  			amount = 1250000000, alteration = Alteration},
  	OfferId = add_offer([Price], 4),
  	receive
  		Input1 ->
  			{struct, OfferEvent} = mochijson:decode(Input1),
  			{_, "ProductOfferingCreationNotification"}
  					= lists:keyfind("eventType", 1, OfferEvent)
  	end,
  	{ok, #product{id = ProdId} = P} = ocs:add_product(OfferId, []),
  	receive
  		Input2 ->
  			{struct, ProductEvent} = mochijson:decode(Input2),
  			{_, "ProductCreationNotification"}
  					= lists:keyfind("eventType", 1, ProductEvent),
  			{_, {struct, ProductList}} = lists:keyfind("event", 1, ProductEvent),
  			{_, ProdId} = lists:keyfind("id", 1, ProductList)
  	end,
  	Expired = erlang:system_time(?MILLISECOND) - 3599000,
  	ok = mnesia:dirty_write(product, P#product{payment =
  			[{Price#price.name, Expired}]}),
  	B1 = #bucket{units = cents, remain_amount = 1000000000,
  			start_date = erlang:system_time(?MILLISECOND),
  			end_date = erlang:system_time(?MILLISECOND) + 2592000000},
  	{ok, _, #bucket{id = BId1}} = ocs:add_bucket(ProdId, B1),
  	receive
  		Input3 ->
  			{struct, BalanceEvent1} = mochijson:decode(Input3),
  			{_, "BucketBalanceCreationNotification"}
  					= lists:keyfind("eventType", 1, BalanceEvent1),
  			{_, {struct, BalanceList1}} = lists:keyfind("event", 1, BalanceEvent1),
  			{_, BId1} = lists:keyfind("id", 1, BalanceList1)
  	end,
  	B2 = #bucket{units = cents, remain_amount = 1000000000,
  			start_date = erlang:system_time(?MILLISECOND),
  			end_date = erlang:system_time(?MILLISECOND) + 2592000000},
  	{ok, _, #bucket{id = BId2}} = ocs:add_bucket(ProdId, B2),
  	receive
  		Input4 ->
  			{struct, BalanceEvent2} = mochijson:decode(Input4),
  			{_, "BucketBalanceCreationNotification"}
  					= lists:keyfind("eventType", 1, BalanceEvent2),
  			{_, {struct, BalanceList2}} = lists:keyfind("event", 1, BalanceEvent2),
  			{_, BId2} = lists:keyfind("id", 1, BalanceList2)
  	end,
  	ok = ocs_scheduler:product_charge(),
  	AdjustmentStructs = receive
  		Input ->
  			{struct, AdjustmentEvent} = mochijson:decode(Input),
  			{_, "BalanceAdjustmentCreationNotification"}
  					= lists:keyfind("eventType", 1, AdjustmentEvent),
  			{_, {array, AdjStructList}}
  					= lists:keyfind("event", 1, AdjustmentEvent),
  			AdjStructList
  	end,
  	Fcents = fun({struct, AdjustmentList}) ->
  				case lists:keyfind("amount", 1, AdjustmentList) of
  					{_, {struct, [{"amount", Amount}, {"units","cents"}]}} ->
  						{true, list_to_integer(Amount)};
  					{_, {struct, [{"units","cents"}, {"amount", Amount}]}} ->
  						{true, list_to_integer(Amount)};
  					_ ->
  						false
  				end
  	end,
  	-1250 = lists:sum(lists:filtermap(Fcents, AdjustmentStructs)).
  
  query_product_notification() ->
  	[{userdata, [{doc, "Query product notification"}]}].
  
  