anchor.diff:  	SubscriberID = list_to_binary(ocs:generate_identity()),
   	Password = ocs:generate_password(),
   	Chars = [{validity, erlang:system_time(?MILLISECOND) + 2592000000}],
  -	RemAmount = 100,
  -	Debit = 1000,
  -	Buckets = [#bucket{units = cents, remain_amount = RemAmount,
  +	Buckets = [#bucket{units = cents, remain_amount = PackagePrice,
   		start_date = erlang:system_time(?MILLISECOND),
   		termination_date = erlang:system_time(?MILLISECOND) + 2592000000}],
   	Destination = ocs:generate_identity(),
   	{ok, _} = ocs:add_subscriber(SubscriberID, Password, ProdID, Chars, Buckets),
   	SessionId = [{'Session-Id', list_to_binary(ocs:generate_password())}],
   	{ok, _, _} = ocs_rating:rate(diameter, SubscriberID, Destination, initial, [], [], SessionId),
  -	{ok, _, _} = ocs_rating:rate(diameter, SubscriberID, Destination, final, [{octets, Debit}], [], SessionId),
  +	{ok, _, _} = ocs_rating:rate(diameter, SubscriberID, Destination, final, [{octets, PackageSize}], [], SessionId),
   	{ok, #subscriber{buckets = []}} = ocs:find_subscriber(SubscriberID).
   
   octets_debiting_scenario_4() ->
  -	[{userdata, [{doc, "Rate cents buckets to octets
  -		and deduct usage from rated buckets, This senario
  -		describ out of credit"}]}].
  +	[{userdata, [{doc, "Out of credit"}]}].
   
   octets_debiting_scenario_4(_Config) ->
   	ProdID = ocs:generate_password(),
  
positive.code: 	Destination = ocs:generate_identity(),
  	{out_of_credit, []} = ocs_rating:rate(diameter, SubscriberID, Destination, initial, [], [{octets, Reservation}], SessionId),
  	{ok, #subscriber{buckets = RatedBuckets}} = ocs:find_subscriber(SubscriberID),
  	#bucket{remain_amount = RemAmount} = lists:keyfind(cents, #bucket.units, RatedBuckets).
  
  octets_reservation_scenario_5() ->
  	[{userdata, [{doc, "This senario describ when out of
  		credit remove session attributes from subscriber record"}]}].
  
  octets_reservation_scenario_5(_Config) ->
  	ProdID = ocs:generate_password(),
  
negative.code: 	SubscriberID = list_to_binary(ocs:generate_identity()),
  	Password = ocs:generate_password(),
  	Chars = [{validity, erlang:system_time(?MILLISECOND) + 2592000000}],
  	RemAmount = 300,
  	Debit = 1000,
  	Reservation = 1000,
  	Buckets = [#bucket{units = cents, remain_amount = RemAmount,
  		start_date = erlang:system_time(?MILLISECOND),
  		termination_date = erlang:system_time(?MILLISECOND) + 2592000000}],
  	Destination = ocs:generate_identity(),
  	{ok, _} = ocs:add_subscriber(SubscriberID, Password, ProdID, Chars, Buckets),
  	SessionId = [{'Session-Id', list_to_binary(ocs:generate_password())}],
  	{ok, _, _} = ocs_rating:rate(diameter, SubscriberID, Destination, initial, [], [{octets, Reservation}], SessionId),
  	{ok, #subscriber{buckets = RatedBuckets1}} = ocs:find_subscriber(SubscriberID),
  	#bucket{remain_amount = CentsRemain1, reservations = Reservations1} = lists:keyfind(cents, #bucket.units, RatedBuckets1),
  	F1 = fun(A) when (A rem PackageSize) == 0 ->
  			(A div PackageSize) * PackagePrice;
  		(A) ->
  			(A div PackageSize + 1) * PackagePrice
  	end,
  	F3 = fun(Deb, Reserve, 0) ->
  				(Deb + Reserve);
  			(Deb, Reserve, Reserved) ->
  				case Deb rem Reserved of
  					0 ->
  						Reserve;
  					_ ->
  						(PackagePrice + Reserve)
  				end
  	end,
  	F2 = fun(Deb, Reserve, Reserved) -> F3(F1(Deb), F1(Reserve), Reserved) end,
  	CentsRemain1 = RemAmount - F1(Reservation),
  	{_, Reservation1, _} = lists:keyfind(SessionId, 3, Reservations1),
  	Reservation1 = F2(0, Reservation, 0),
  	{ok, _, _} = ocs_rating:rate(diameter, SubscriberID, Destination, interim, [{octets, Debit}], [{octets, Reservation}], SessionId),
  	{ok, #subscriber{buckets = RatedBuckets}} = ocs:find_subscriber(SubscriberID),
  	#bucket{remain_amount = CentsRemain2, reservations = Reservations2} = lists:keyfind(cents, #bucket.units, RatedBuckets),
  	CentsRemain2 = CentsRemain1 - F1(Debit),
  	{_, Reservation2, _} = lists:keyfind(SessionId, 3, Reservations2),
  	Reservation2 = F2(Debit, Reservation, Reservation1).
  
  octets_debit_and_reservation_scenario_2() ->
  	[{userdata, [{doc, "Debit amount is less than package size and
  		reservation amount less than avaliable remain amount, Whole senoario base on
  		sufficient amount"}]}].
  
  