anchor.diff:  			json-patch media type"}]}].
   
   update_user_characteristics_json_patch(Config) ->
  -	ContentType = "application/json",
  -	ID = "ryan",
   	Username = "ryanstiles",
   	Password = "wliaycaducb46",
   	Locale = "en",
  -	PasswordAttr = {struct, [{"name", "password"}, {"value", Password}]},
  -	LocaleAttr = {struct, [{"name", "locale"}, {"value", Locale}]},
  -	UsernameAttr = {struct, [{"name", "username"}, {"value", Username}]},
  -	CharArray = {array, [UsernameAttr, PasswordAttr, LocaleAttr]},
  -	JSON = {struct, [{"id", ID}, {"characteristic", CharArray}]},
  -	RequestBody = lists:flatten(mochijson:encode(JSON)),
  -	HostUrl = ?config(host_url, Config),
  -	Accept = {"accept", ContentType},
  -	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},
  -	Request1 = {HostUrl ++ "/partyManagement/v1/individual", [Accept, Authentication], ContentType, RequestBody},
  -	{ok, Result} = httpc:request(post, Request1, [], []),
  -	{{"HTTP/1.1", 201, _Created}, Headers, ResponseBody} = Result,
  -	{_, "application/json"} = lists:keyfind("content-type", 1, Headers),
  -	{_, Etag} = lists:keyfind("etag", 1, Headers),
  -	true = is_etag_valid(Etag),
  -	ContentLength = integer_to_list(length(ResponseBody)),
  -	{_, ContentLength} = lists:keyfind("content-length", 1, Headers),
  -	{_, URI} = lists:keyfind("location", 1, Headers),
  -	{"/partyManagement/v1/individual/" ++ ID, _} = httpd_util:split_path(URI),
  -	{struct, Object} = mochijson:decode(ResponseBody),
  -	{_, ID} = lists:keyfind("id", 1, Object),
  +	{ok, _} = ocs:add_user(Username, Password, Locale),
  +	HostUrl = ?config(host_url, Config),
  +	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},
  +	Accept = {"accept", "application/json"},
  +	Encodekey = base64:encode_to_string(string:concat(RestUser ++ ":", RestPass)),
  +	AuthKey = "Basic " ++ Encodekey,
  +	Authentication = {"authorization", AuthKey},
  +	Request2 = {HostUrl ++ "/partyManagement/v1/individual/" ++ Username,
  +			[Accept, Authentication]},
  +	{ok, Result1} = httpc:request(get, Request2, [], []),
  +	{{"HTTP/1.1", 200, _OK}, Headers1, Body1} = Result1,
  +	{_, "application/json"} = lists:keyfind("content-type", 1, Headers1),
  +	{struct, Object} = mochijson:decode(Body1),
   	{_, URI} = lists:keyfind("href", 1, Object),
   	{_, {array, Characteristic}} = lists:keyfind("characteristic", 1, Object),
  -	RestPort = ?config(port, Config),
  -	{ok, SslSock} = ssl:connect({127,0,0,1}, RestPort,  [binary, {active, false}], infinity),
  -	ok = ssl:ssl_accept(SslSock),
  -	NewContentType = "application/json-patch+json",
  +	ContentType = "application/json-patch+json",
   	NewPassword = ocs:generate_password(),
   	NewPwdObj = {struct, [{"name", "password"}, {"value", NewPassword}]},
   	NewLocale = "es",
  
positive.code: 	end,
  	RecvBuf = F2(F2, SslSock, ssl:recv(SslSock, 0, Timeout), []),
  	PatchResponse = list_to_binary(RecvBuf),
  	[Headers1, <<>>] = binary:split(PatchResponse, <<$\r,$\n,$\r,$\n>>),
  	<<"HTTP/1.1 204", _/binary>> = Headers1,
  	ok = ssl:close(SslSock).
  
  add_product() ->
  	[{userdata, [{doc,"Create a new product offering."}]}].
  
negative.code: 	end,
  	IndexPassword= F1(F1, Characteristic, "password", 0),
  	IndexLocale = F1(F1, Characteristic, "locale", 0),
  	JSON = {array, [
  			{struct, [{op, "add"}, {path, "/characteristic/" ++ IndexPassword}, {value, NewPwdObj}]},
  			{struct, [{op, "replace"}, {path, "/characteristic/" ++ IndexLocale}, {value, NewLocaleObj}]}]},
  	PatchBody = lists:flatten(mochijson:encode(JSON)),
  	PatchBodyLen = size(list_to_binary(PatchBody)),
  	RestPort = ?config(port, Config),
  	PatchReq = ["PATCH ", URI, " HTTP/1.1",$\r,$\n,
  			"Content-Type:" ++ ContentType, $\r,$\n, "Accept:application/json",$\r,$\n,
  			"Authorization:"++ AuthKey,$\r,$\n,
  			"Host:localhost:" ++ integer_to_list(RestPort),$\r,$\n,
  			"Content-Length:" ++ integer_to_list(PatchBodyLen),$\r,$\n,
  			$\r, $\n,
  			PatchBody],
  	{ok, SslSock} = ssl:connect({127,0,0,1}, RestPort,  [binary, {active, false}], infinity),
  	ok = ssl:ssl_accept(SslSock),
  	ok = ssl:send(SslSock, list_to_binary(PatchReq)),
  	Timeout = 1500,
  	F2 = fun(_F, _Sock, {error, timeout}, Acc) ->
  