anchor.diff:  	end,
   	IndexPassword= F1(F1, Characteristic, "password", 0),
   	IndexLocale = F1(F1, Characteristic, "locale", 0),
  -	JSON1 = {array, [
  -			{struct, [{op, "replace"}, {path, "/characteristic/" ++ IndexPassword}, {value, NewPwdObj}]},
  +	JSON = {array, [
  +			{struct, [{op, "add"}, {path, "/characteristic/" ++ IndexPassword}, {value, NewPwdObj}]},
   			{struct, [{op, "replace"}, {path, "/characteristic/" ++ IndexLocale}, {value, NewLocaleObj}]}]},
  -	PatchBody = lists:flatten(mochijson:encode(JSON1)),
  +	PatchBody = lists:flatten(mochijson:encode(JSON)),
   	PatchBodyLen = size(list_to_binary(PatchBody)),
  -	PatchUri = "/partyManagement/v1/individual/" ++ ID,
  -	PatchReq = ["PATCH ", PatchUri, " HTTP/1.1",$\r,$\n,
  -			"Content-Type:" ++ NewContentType, $\r,$\n, "Accept:application/json",$\r,$\n,
  -			"If-match:" ++ Etag,$\r,$\n,"Authorization:"++ AuthKey,$\r,$\n,
  +	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) ->
  
positive.code: 			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),
  	{_, 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",
  	NewPassword = ocs:generate_password(),
  	NewPwdObj = {struct, [{"name", "password"}, {"value", NewPassword}]},
  	NewLocale = "es",
  
negative.code: 	end,
  	RecvBuf = F2(F2, SslSock, ssl:recv(SslSock, 0, Timeout), []),
  	PatchResponse = list_to_binary(RecvBuf),
  	[Headers2, <<>>] = binary:split(PatchResponse, <<$\r,$\n,$\r,$\n>>),
  	<<"HTTP/1.1 204", _/binary>> = Headers2,
  	ok = ssl:close(SslSock),
  	{ok, #httpd_user{username = Username, password = NewPassword,
  			user_data = UserData}} = ocs:get_user(Username),
  	{_, NewLocale} = lists:keyfind(locale, 1, UserData).
  
  add_product() ->
  	[{userdata, [{doc,"Create a new product offering."}]}].
  