anchor.diff:  	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, 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),
   	{out_of_credit, _} = ocs_rating:rate(diameter, SubscriberID, Destination, interim, [{octets, Debit}], [{octets, Reservation}], SessionId),
  -	{ok, #subscriber{buckets = RatedBuckets}} = ocs:find_subscriber(SubscriberID),
  -	#bucket{remain_amount = OctetsRemain} = lists:keyfind(octets, #bucket.units, RatedBuckets),
  -	OctetsRemain = (PackageSize * 2) - Debit,
  -	false = lists:keyfind(cents, #bucket.units, RatedBuckets).
  +	{ok, #subscriber{buckets = []}} = ocs:find_subscriber(SubscriberID).
   
   octets_debit_and_reservation_scenario_5() ->
  -	[{userdata, [{doc, "Senario of insuffient amount for
  -			dibit and the reservation"}]}].
  +	[{userdata, [{doc, "Insuffient amount for dibit and the reservation"}]}].
   
   octets_debit_and_reservation_scenario_5(_Config) ->
   	ProdID = ocs:generate_password(),
  
positive.code: 	Password = ocs:generate_password(),
  	Chars = [{validity, erlang:system_time(?MILLISECOND) + 2592000000}],
  	RemAmount = 200,
  	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, _, Reservation} = ocs_rating:rate(diameter, SubscriberID, Destination, initial, [], [{octets, Reservation}], SessionId),
  	{ok, #subscriber{buckets = RatedBuckets}} = ocs:find_subscriber(SubscriberID),
  	#bucket{remain_amount = CentsRemain} = lists:keyfind(cents, #bucket.units, RatedBuckets),
  	CentsRemain = RemAmount - PackagePrice,
  	#bucket{remain_amount = PackageSize} = lists:keyfind(octets, #bucket.units, RatedBuckets).
  
  octets_reservation_scenario_2() ->
  	[{userdata, [{doc, "Rate cents buckets to octets
  		and This senario describ reservation amount less
  		than the package size"}]}].
  
  octets_reservation_scenario_2(_Config) ->
  
negative.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 = 0} = lists:keyfind(cents, #bucket.units, RatedBuckets).
  
  octets_reservation_scenario_5() ->
  	[{userdata, [{doc, "Out of credit remove session
  			attributes from subscriber record"}]}].
  
  octets_reservation_scenario_5(_Config) ->
  	ProdID = ocs:generate_password(),
  