anchor.diff:  	ServiceID = list_to_binary(ocs:generate_identity()),
   	{ok, #service{}} = ocs:add_service(ServiceID, undefined, ProdRef, []),
   	Balance = rand:uniform(100000),
  -	B1 = bucket(octets, Size ),
  +	B1 = bucket(octets, Balance),
   	_BId = add_bucket(ProdRef, B1),
   	Ref = erlang:ref_to_list(make_ref()),
   	SId = diameter:session_id(Ref),
  
positive.code: 	_BId = add_bucket(ProdRef, B1),
  	Ref = erlang:ref_to_list(make_ref()),
  	SId = diameter:session_id(Ref),
  	Subscription_Id = #'3gpp_ro_Subscription-Id'{
  			'Subscription-Id-Type' = ?'3GPP_SUBSCRIPTION-ID-TYPE_END_USER_E164',
  			'Subscription-Id-Data' = CallingParty},
  	RequestedUnits = #'3gpp_ro_Requested-Service-Unit' {
  			'CC-Service-Specific-Units' = [1]},
  	ServiceInformation = #'3gpp_ro_Service-Information'{
  			'SMS-Information' = [#'3gpp_ro_SMS-Information'{
  			'Recipient-Info' = [#'3gpp_ro_Recipient-Info'{
  			'Recipient-Address' = [#'3gpp_ro_Recipient-Address'{
  			'Address-Data' = [CalledParty]}]}]}]},
  	MultiServices_CC0 = #'3gpp_ro_Multiple-Services-Credit-Control'{
  			'Requested-Service-Unit' = [RequestedUnits]},
  	RequestNum0 = 0,
  	CC_CCR0 = #'3gpp_ro_CCR'{'Session-Id' = SId,
  			'Auth-Application-Id' = ?RO_APPLICATION_ID,
  			'Service-Context-Id' = "nas45.32274@3gpp.org",
  			'User-Name' = [CallingParty],
  			'CC-Request-Type' = ?'3GPP_CC-REQUEST-TYPE_INITIAL_REQUEST',
  			'CC-Request-Number' = RequestNum0,
  			'Event-Timestamp' = [calendar:universal_time()],
  			'Subscription-Id' = [Subscription_Id],
  			'Multiple-Services-Credit-Control' = [MultiServices_CC0],
  			'Service-Information' = [ServiceInformation]},
  	{ok, Answer0} = diameter:call(?MODULE, cc_app_test, CC_CCR0, []),
  	#'3gpp_ro_CCA'{'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  			'Auth-Application-Id' = ?RO_APPLICATION_ID,
  			'CC-Request-Type' = ?'3GPP_CC-REQUEST-TYPE_INITIAL_REQUEST',
  			'CC-Request-Number' = RequestNum,
  			'Multiple-Services-Credit-Control' = [MultiServices_CC1]} = Answer0,
  	#'3gpp_ro_Multiple-Services-Credit-Control'{
  			'Granted-Service-Unit' = [GrantedUnits]} = MultiServices_CC1,
  	#'3gpp_ro_Granted-Service-Unit'{'CC-Service-Specific-Units' = [1]} = GrantedUnits,
  	NewRequestNum = RequestNum + 1,
  	UsedUnits = #'3gpp_ro_Used-Service-Unit'{'CC-Service-Specific-Units' = [1]},
  	MultiServices_CC2 = #'3gpp_ro_Multiple-Services-Credit-Control'{
  			'Used-Service-Unit' = [UsedUnits]},
  	CC_CCR1 = #'3gpp_ro_CCR'{'Session-Id' = SId,
  			'Auth-Application-Id' = ?RO_APPLICATION_ID,
  			'Service-Context-Id' = "nas45.32251@3gpp.org" ,
  			'User-Name' = [CalledParty],
  			'CC-Request-Type' = ?'3GPP_CC-REQUEST-TYPE_TERMINATION_REQUEST',
  			'CC-Request-Number' = NewRequestNum,
  			'Event-Timestamp' = [calendar:universal_time()],
  			'Multiple-Services-Credit-Control' = [MultiServices_CC2],
  			'Subscription-Id' = [Subscription_Id],
  			'Service-Information' = [ServiceInformation]},
  	{ok, Answer1} = diameter:call(?MODULE, cc_app_test, CC_CCR1, []),
  	#'3gpp_ro_CCA'{'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  			'Auth-Application-Id' = ?RO_APPLICATION_ID,
  			'CC-Request-Type' = ?'3GPP_CC-REQUEST-TYPE_TERMINATION_REQUEST',
  			'CC-Request-Number' = NewRequestNum} = Answer1.
  
  %%---------------------------------------------------------------------
  %%  Internal functions
  
negative.code: 		TestCase == diameter_scur;
  		TestCase == diameter_scur_no_credit;
  		TestCase == diameter_scur_depletion;
  		TestCase == diameter_ecur;
  		TestCase == diameter_ecur_no_credit ->
  	Address = ?config(diameter_acct_address, Config),
  	{ok, _} = ocs:add_client(Address, undefined, diameter, undefined, true),
  	Config.
  