anchor.diff:  %% Cleanup after the whole suite.
   %%
   end_per_suite(Config) ->
  +	ok = ocs_test_lib:stop(),
  +	Config.
  +
  +-spec init_per_testcase(TestCase :: atom(), Config :: [tuple()]) -> any().
  +%% Cleanup after the whole suite.
  +%%
  +init_per_testcase(TestCase, Config)
   		when TestCase == send_initial_scur; TestCase == receive_initial_scur;
   		TestCase == send_interim_scur; TestCase == receive_interim_scur;
   		TestCase == send_final_scur; TestCase == receive_final_scur;
  
positive.code: 		receive_interim_scur, send_final_scur, receive_final_scur,
  		receive_interim_no_usu_scur, receive_initial_empty_rsu_scur,
  		post_initial_scur, post_update_scur, post_final_scur, send_iec,
  		receive_iec, send_initial_ecur].
  
  %%---------------------------------------------------------------------
  %%  Test cases
  
negative.code: 	Ref = erlang:ref_to_list(make_ref()),
  	SId = diameter:session_id(Ref),
  	RequestNum = 0,
  	Answer0 = diameter_ecur_start(Subscriber, SId, RequestNum),
  	#'3gpp_ro_CCA'{'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_SUCCESS'} = Answer0.
  
  receive_initial_ecur() ->
  	[{userdata, [{doc, "On ECUR startRating response send CCA-I"}]}].
  
  receive_initial_ecur(_Config) ->
  	P1 = price(usage, messages, 1, rand:uniform(1000000)),
  	OfferId = add_offer([P1], 11),
  	ProdRef = add_product(OfferId),
  	MSISDN = list_to_binary(ocs:generate_identity()),
  	IMSI = list_to_binary(ocs:generate_identity()),
  	Subscriber = {MSISDN, IMSI},
  	Password = ocs:generate_identity(),
  	{ok, #service{}} = ocs:add_service(MSISDN, Password, ProdRef, []),
  	B1 = bucket(messages, 5),
  	_BId = add_bucket(ProdRef, B1),
  	Ref = erlang:ref_to_list(make_ref()),
  	SId = diameter:session_id(Ref),
  	RequestNum = 0,
  	RequestType = ?'3GPP_CC-REQUEST-TYPE_INITIAL_REQUEST',
  	Answer0 = diameter_ecur_start(Subscriber, SId, RequestNum),
  	#'3gpp_ro_CCA'{'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  			'Auth-Application-Id' = ?RO_APPLICATION_ID,
  			'CC-Request-Type' = RequestType,
  			'CC-Request-Number' = RequestNum,
  			'Multiple-Services-Credit-Control' = [MultiServices_CC]} = Answer0,
  	#'3gpp_ro_Multiple-Services-Credit-Control'{
  			'Granted-Service-Unit' = [UsedUnits]} = MultiServices_CC,
  	#'3gpp_ro_Granted-Service-Unit'{'CC-Service-Specific-Units' = [1]} = UsedUnits.
  
  %%---------------------------------------------------------------------
  %%  Internal functions
  %%---------------------------------------------------------------------
  
  diameter_ecur_start({MSISDN, IMSI}, SId, RequestNum) ->
  	MSISDN1 = #'3gpp_ro_Subscription-Id'{
  			'Subscription-Id-Type' = ?'3GPP_SUBSCRIPTION-ID-TYPE_END_USER_E164',
  			'Subscription-Id-Data' = MSISDN},
  