anchor.diff:  	{struct, Object} = mochijson:decode(ResponseBody),
   	{"id", ID} = lists:keyfind("id", 1, Object),
   	{_, URI} = lists:keyfind("href", 1, Object),
  -	{"product", ProdID} = lists:keyfind("product", 1, Object),
  +	{"product", ProdId} = lists:keyfind("product", 1, Object),
   	{_, {array, Chars}} = lists:keyfind("serviceCharacteristic", 1, Object),
   	F = fun({struct, [{"name", "servicePassword"}, {"value", Password}]}) ->
   					12 == length(Password);
  
positive.code: 	authenticate_subscriber_request, unauthenticate_subscriber_request,
  	authenticate_client_request, unauthenticate_client_request,
  	add_service, add_service_inventory, add_service_inventory_without_password,
  	get_subscriber, get_subscriber_not_found, get_all_subscriber,
  	get_subscriber_range, delete_service,
  	add_client, add_client_without_password, get_client, get_client_id,
  	get_client_bogus, get_client_notfound, get_all_clients,
  
negative.code: 	end,
  	lists:any(F, Chars).
  
  get_service_inventory() ->
  	[{userdata, [{doc,"get service invetory for spefici service id"}]}].
  
  get_service_inventory(Config) ->
  	OfferId = ?config(product_id, Config),
  	{ok, #product{id = ProdRef}} = ocs:add_subscription(OfferId, []),
  	ID = ocs:generate_identity(),
  	Password = ocs:generate_password(),
  	SessionTimeout = rand:uniform(2500),
  	AcctInterimInterval = rand:uniform(500),
  	Attributes = [{?SessionTimeout, SessionTimeout},
  			{?AcctInterimInterval, AcctInterimInterval}],
  	{ok, #service{}} = ocs:add_service(ID, Password, ProdRef, Attributes, true, false),
  	HostUrl = ?config(host_url, Config),
  	Accept = {"accept", "application/json"},
  	RestUser = ct:get_config(rest_user),
  	RestPass = ct:get_config(rest_pass),
  	Encodekey = base64:encode_to_string(string:concat(RestUser ++ ":", RestPass)),
  	AuthKey = "Basic " ++ Encodekey,
  	Authentication = {"authorization", AuthKey},
  	Request = {HostUrl ++ "/serviceInventoryManagement/v2/service/" ++ ID,
  			[Accept, Authentication]},
  	{ok, Result} = httpc:request(get, Request, [], []),
  	{{"HTTP/1.1", 200, _OK}, Headers, ResponseBody} = Result,
  	{_, "application/json"} = lists:keyfind("content-type", 1, Headers),
  	{_, _} = lists:keyfind("etag", 1, Headers),
  	{_, URI} = lists:keyfind("location", 1, Headers),
  	{"serviceInventoryManagement/v2/service/" ++ ID, _} = httpd_util:split_path(URI),
  	ContentLength = integer_to_list(length(ResponseBody)),
  	{_, ContentLength} = lists:keyfind("content-length", 1, Headers),
  	{struct, Object} = mochijson:decode(ResponseBody),
  	{"id", ID} = lists:keyfind("id", 1, Object),
  	{_, URI} = lists:keyfind("href", 1, Object),
  	{"product", ProdRef} = lists:keyfind("product", 1, Object),
  	{"isServiceEnabled", true} = lists:keyfind("isServiceEnabled", 1, Object),
  	{_, {array, Chars}} = lists:keyfind("serviceCharacteristic", 1, Object),
  	F = fun({struct, [{"name", "serviceIdentity"}, {"value", ID1}]}) when ID1 == ID ->
  				true;
  			({struct, [{"name", "servicePassword"}, {"value", Password1}]}) when Password1 == Password ->
  				true;
  			({struct, [{"name", "multiSession"}, {"value", false}]}) ->
  				true;
  			({struct, [{"name", "acctSessionInterval"}, {"value", AcctInterimInterval1}]})
  					when AcctInterimInterval1 == AcctInterimInterval ->
  				true;
  			({struct, [{"name", "sessionTimeout"}, {"value", SessionTimeout1}]})
  					when SessionTimeout1 == SessionTimeout ->
  				true;
  			({struct, [{"value", ID1}, {"name", "serviceIdentity"}]}) when ID1 == ID ->
  				true;
  			({struct, [{"value", Password1}, {"name", "servicePassword"}]}) when Password1 == Password ->
  				true;
  			({struct, [{"value", false}, {"name", "multiSession"}]}) ->
  				true;
  			({struct, [{"value", AcctInterimInterval1}, {"name", "acctSessionInterval"}]})
  					when AcctInterimInterval1 == AcctInterimInterval ->
  				true;
  			({struct, [{"value", SessionTimeout1}, {"name", "sessionTimeout"}]})
  					when SessionTimeout1 == SessionTimeout ->
  				true;
  			(_) ->
  				false
  	end,
  	true = lists:all(F, Chars).
  
  get_subscriber_not_found() ->
  	[{userdata, [{doc, "get subscriber notfound in rest interface"}]}].
  