anchor.diff:  -define(PathResourceHub, "/resourceInventory/v1/hub/").
   -define(PathUsageHub, "/usageManagement/v1/hub/").
   -define(PathRole, "/partyRoleManagement/v4/").
  +
  +%% support deprecated_time_unit()
  +-define(MILLISECOND, milli_seconds).
   
   %%---------------------------------------------------------------------
   %%  Test server callback functions
  
positive.code: 	post_tariff_resource, delete_tariff_resource, update_tariff_resource,
  	post_policy_resource, query_policy_resource, arbitrary_char_service,
  	delete_policy_table, oauth_authentication,
  	post_hub_role, delete_hub_role, get_role_hubs, get_role_hub].
  
  %%---------------------------------------------------------------------
  %%  Test cases
  
negative.code: 					#resource_char{name = "precedence", value = 2}]},
  	{ok, #resource{id = RowId}} = ocs:add_resource(PolicyRow),
  	RowId.
  
  %% @hidden
  party_role(RoleName) ->
  	RoleType = "PartyRole",
  	StartDate = ocs_rest:iso8601(erlang:system_time(?MILLISECOND)),
  	EndDate = ocs_rest:iso8601(erlang:system_time(?MILLISECOND) + 31536000000),
  	{struct, [{"@type", RoleType},
  		{"name", RoleName},
  		{"validFor", {struct, [{"startDateTime", StartDate},
  				{"endDateTime", EndDate}]}}]}.
  
  %% @hidden
  is_role({struct, RoleObj}) when length(RoleObj) == 5 ->
  	F = fun F({"id", Name}) when is_list(Name) ->
  				true;
  			F({"href", Href}) when is_list(Href) ->
  				true;
  			F({"name", Name}) when is_list(Name) ->
  				true;
  			F({"@type", RoleType}) when is_list(RoleType) ->
  				true;
  			F({"startDateTime", SD}) when is_list(SD) ->
  				true;
  			F({"endDateTime", ED}) when is_list(ED) ->
  				true;
  			F({"validFor", {struct, ValidFor}}) when length(ValidFor) == 2 ->
  				lists:all(F, ValidFor);
  			F(_) ->
  				false
  	end,
  	lists:all(F, RoleObj);
  is_role(_) ->
  	false.
  