anchor.diff:  	Ref = erlang:ref_to_list(make_ref()),
      SId = diameter:session_id(Ref),
      RequestNum0 = 0,
  -	RequestedServiceUnits = rand:uniform(Balance),
  -   _Answer0 = diameter_scur_start(SId, Subscriber, RequestNum0, RequestedServiceUnits),
  -	{struct, _Inital} = receive
  -		JSON ->
  -			mochijson:decode(JSON)
  -	end,
  +	InputOctets1 = rand:uniform(Balance),
  +	OutputOctets1 = rand:uniform(Balance),
  +	RequestedServiceUnits = {InputOctets1, OutputOctets1},
  +   Answer0 = diameter_scur_start(SId, Subscriber, RequestNum0, RequestedServiceUnits),
  +	#'3gpp_ro_CCA'{'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_SUCCESS'} = Answer0,
   	RequestNum1 = RequestNum0 + 1,
  -	Grant =  rand:uniform(Balance div 2),
  -	_Answer1 = diameter_scur_interim(SId, Subscriber, RequestNum1, Grant, 0),
  -	{struct, Interim} = receive
  -		JSON1 ->
  -			mochijson:decode(JSON1)
  -	end,
  -erlang:display({?MODULE, ?LINE, Interim}),
  -	MSISDN1 = binary_to_list(MSISDN), 
  -	IMSI1 = binary_to_list(IMSI), 
  -	{_, {_, [{"nodeFunctionality","OCF"}]}} = lists:keyfind("nfConsumerIdentification", 1, Interim),
  -	{_, {array,["msisdn-" ++ MSISDN1, "imsi-" ++ IMSI1]}} 
  -			= lists:keyfind("subscriptionId", 1, Interim),
  -	{_, {_, [{_, Attributes}]}} = lists:keyfind("serviceRating", 1, Interim),
  -	{"serviceContextId", "32251@3gpp.org"} = lists:keyfind("serviceContextId", 1, Attributes),
  -	{"serviceId", 1} = lists:keyfind("serviceId", 1, Attributes),
  -	{"ratingGroup", 2} = lists:keyfind("ratingGroup", 1, Attributes),
  -	{_,{_,[{"totalVolume", Grant}]}} = lists:keyfind("consumedUnit", 1, Attributes),
  -	{"requestSubType", "DEBIT"} = lists:keyfind("requestSubType", 1, Attributes).
  +	InputOctets2 = rand:uniform(Balance div 2),
  +	OutputOctets2 = rand:uniform(Balance),
  +	UsedServiceUnits = {InputOctets2, OutputOctets2},
  +	Answer1 = diameter_scur_interim(SId, Subscriber, RequestNum1, UsedServiceUnits, 0),
  +	#'3gpp_ro_CCA'{'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_SUCCESS'} = Answer1.
   
   receive_interim_scur() ->
   	[{userdata, [{doc, "On IEC updateRating response send CCA-U"}]}].
  
positive.code: %%
  all() -> 
  	[send_initial_scur, receive_initial_scur, send_interim_scur,
  		receive_interim_scur, send_final_scur, receive_final_scur].
  
  %%---------------------------------------------------------------------
  %%  Test cases
  
negative.code: 	{ok, Answer} = diameter:call(?MODULE, cc_app_test, CC_CCR, []),
  	Answer.
  
  diameter_scur_interim1(SId, {MSISDN, IMSI}, RequestNum, _Used, {InputOctets, OutputOctets}) ->
  	MSISDN1 = #'3gpp_ro_Subscription-Id'{
  			'Subscription-Id-Type' = ?'3GPP_SUBSCRIPTION-ID-TYPE_END_USER_E164',
  			'Subscription-Id-Data' = MSISDN},
  	IMSI1 = #'3gpp_ro_Subscription-Id'{
  			'Subscription-Id-Type' = ?'3GPP_SUBSCRIPTION-ID-TYPE_END_USER_IMSI',
  			'Subscription-Id-Data' = IMSI},
  	UsedUnits = #'3gpp_ro_Used-Service-Unit'{
  			'CC-Total-Octets' = []},
  	RequestedUnits = #'3gpp_ro_Requested-Service-Unit' {
  			'CC-Input-Octets' = [InputOctets], 'CC-Output-Octets' = [OutputOctets],
  			'CC-Total-Octets' = [InputOctets + OutputOctets]},
  	MultiServices_CC = #'3gpp_ro_Multiple-Services-Credit-Control'{
  			'Used-Service-Unit' = [UsedUnits],
  			'Requested-Service-Unit' = [RequestedUnits], 'Service-Identifier' = [1],
  			'Rating-Group' = [2]},
  	ServiceInformation = #'3gpp_ro_Service-Information'{'PS-Information' =
  			[#'3gpp_ro_PS-Information'{
  					'3GPP-PDP-Type' = [3],
  					'Serving-Node-Type' = [2],
  					'SGSN-Address' = [{10,1,2,3}],
  					'GGSN-Address' = [{10,4,5,6}],
  					'3GPP-IMSI-MCC-MNC' = [<<"001001">>],
  					'3GPP-GGSN-MCC-MNC' = [<<"001001">>],
  					'3GPP-SGSN-MCC-MNC' = [<<"001001">>]}]},
  	CC_CCR = #'3gpp_ro_CCR'{'Session-Id' = SId,
  		'Auth-Application-Id' = ?RO_APPLICATION_ID,
  		'Service-Context-Id' = "32251@3gpp.org" ,
  		'User-Name' = [MSISDN],
  		'CC-Request-Type' = ?'3GPP_CC-REQUEST-TYPE_UPDATE_REQUEST',
  		'CC-Request-Number' = RequestNum,
  		'Event-Timestamp' = [calendar:universal_time()],
  		'Multiple-Services-Credit-Control' = [MultiServices_CC],
  		'Subscription-Id' = [MSISDN1, IMSI1],
  		'Service-Information' = [ServiceInformation]},
  	{ok, Answer} = diameter:call(?MODULE, cc_app_test, CC_CCR, []),
  	Answer.
  
  diameter_scur_stop(SId, {MSISDN, IMSI}, RequestNum, Used) ->
  	MSISDN1 = #'3gpp_ro_Subscription-Id'{
  			'Subscription-Id-Type' = ?'3GPP_SUBSCRIPTION-ID-TYPE_END_USER_E164',
  