anchor.diff:  	notify_delete_product, post_hub_service, delete_hub_service,
   	notify_create_service, notify_delete_service,
   	post_hub_user, delete_hub_user, post_hub_catalog, delete_hub_catalog,
  +	notify_create_offer,
   	post_hub_inventory, delete_hub_inventory, notify_product_charge,
   	oauth_authentication].
   
  
positive.code: 		TestCase == notify_accumulated_balance; TestCase == notify_product_charge;
  		TestCase == notify_accumulated_threshold;
  		TestCase == notify_create_product; TestCase == notify_delete_product;
  		TestCase == notify_create_service; TestCase == notify_delete_service ->
  	true = register(TestCase, self()),
  	case inets:start(httpd, [{port, 0},
  			{server_name, atom_to_list(?MODULE)},
  
negative.code: 	Request1 = {HostUrl ++ PathHub ++ Id, [Accept, auth_header()]},
  	{ok, {{_, 204, _}, _, []}} = httpc:request(delete, Request1, [], []).
  
  notify_create_offer() ->
  	[{userdata, [{doc, "Receive offer creation notification."}]}].
  
  notify_create_offer(Config) ->
  	HostUrl = ?config(host_url, Config),
  	CollectionUrl = HostUrl ++ ?PathCatalogHub,
  	ListenerPort = ?config(listener_port, Config),
  	ListenerServer = "http://localhost:" ++ integer_to_list(ListenerPort),
  	Callback = ListenerServer ++ "/listener/"
  			++ atom_to_list(?MODULE) ++ "/notifycreateoffer",
  	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, [], []),
  	Price1 = price(one_time, undefined, undefined, 1000),
  	Price2 = price(usage, octets, 1000000000, 100),
  	OfferId = add_offer([Price1, Price2], 4),
  	receive
  		Input ->
  			{struct, OfferEvent} = mochijson:decode(Input),
  			{_, "ProductOfferingCreationNotification"}
  					= lists:keyfind("eventType", 1, OfferEvent),
  			{_, {struct, OfferList}} = lists:keyfind("event", 1, OfferEvent),
  			{_, OfferId} = lists:keyfind("id", 1, OfferList)
  	end.
  
  post_hub_inventory() ->
  	[{userdata, [{doc, "Register hub listener for inventory"}]}].
  
  