public void Test_2_19_CreateWithUri_InCloud_NoPatch_NoOverwrite_EtagNone()
        {
            Kii.Initialize("appId", "appKey", Kii.Site.US);
            MockHttpClientFactory factory = new MockHttpClientFactory();

            Kii.HttpClientFactory = factory;
            string objId = "abcd-1234";

            // prepare response
            MockHttpClient client = factory.Client;

            client.AddResponse(201, "{\"createdAt\" : 1, \"modifiedAt\" : 1}", "1");

            // save object to cloud
            KiiObject obj = KiiObject.CreateByUri(new Uri("kiicloud://buckets/test/objects/" + objId));

            obj["key"] = "value";
            obj.SaveAllFields(true);
            Assert.AreEqual("abcd-1234", obj.ID);
            Assert.AreEqual(1, obj.CreatedTime);
            Assert.AreEqual(1, obj.ModifedTime);
            string etag = (string)SDKTestHack.GetField(obj, "mEtag");

            Assert.AreEqual("1", etag);

            // set etag to null
            SDKTestHack.SetField(obj, "mEtag", null);
            obj.SaveAllFields(false);
        }
        public void Test_0504_remove_member()
        {
            // Create test user for group owner
            string  userID = TextUtils.generateUUID();
            KiiUser user   = KiiUser.CreateByUri(new Uri("kiicloud://users/" + userID));

            SDKTestHack.SetField(Kii.Instance, "mLoginUser", user);
            string authToken = TextUtils.generateUUID();

            KiiCloudEngine.UpdateAccessToken(authToken);

            // Prepare group
            string   groupName = TextUtils.randomAlphaNumeric(10);
            string   groupID   = TextUtils.randomAlphaNumeric(26);
            KiiGroup group     = Kii.Group(groupName);

            SDKTestHack.SetField(group, "mId", groupID);
            SDKTestHack.SetField(group, "mOwnerId", userID);

            // Prepare KiiUser for member
            string  memberID = TextUtils.generateUUID();
            KiiUser member   = KiiUser.CreateByUri(new Uri("kiicloud://users/" + memberID));

            group.RemoveUser(member);

            // Check value
            HashSet <KiiUser> addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            HashSet <KiiUser> removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");

            Assert.AreEqual(0, addUsers.Count);
            Assert.AreEqual(1, removeUsers.Count);

            // Prepare mock response for adding user
            client.AddResponse(204, "");

            // Save group
            group.Save();

            // Verify request
            Assert.AreEqual(1, client.RequestUrl.Count);
            Assert.AreEqual(1, client.RequestHeader.Count);
            string requestUrl = AppUtil.getUrlOfSite(AppConst.APP_SITE, AppConst.APP_ID, "groups", groupID, "members", memberID);

            Assert.AreEqual(requestUrl, client.RequestUrl[0]);
            Assert.AreEqual("DELETE", client.RequestMethod[0].ToString());
            IList <MockHttpHeaderList> headers = client.RequestHeader;

            Assert.AreEqual(AppConst.APP_ID, client.RequestHeader[0]["X-Kii-AppID"]);
            Assert.AreEqual(AppConst.APP_KEY, client.RequestHeader[0]["X-Kii-AppKey"]);
            Assert.AreEqual("Bearer " + authToken, client.RequestHeader[0]["Authorization"]);
            Assert.AreEqual(null, client.RequestBody[0]);

            // Verify
            Assert.AreEqual(groupID, group.ID);

            addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");
            Assert.AreEqual(0, addUsers.Count);
            Assert.AreEqual(0, removeUsers.Count);
        }
        public void Test_3_19_CreateWithNoId_InCloud_Patch_NoOverwrite_EtagNone()
        {
            Kii.Initialize("appId", "appKey", Kii.Site.US);
            MockHttpClientFactory factory = new MockHttpClientFactory();

            Kii.HttpClientFactory = factory;

            // set response
            MockHttpClient client = factory.Client;

            client.AddResponse(201, "{\"objectID\" : \"abcd-1234\", \"createdAt\" : 1, \"modifiedAt\" : 1}", "1");

            KiiObject obj = Kii.Bucket("test").NewKiiObject();

            obj["key"] = "value";
            obj.SaveAllFields(false);
            Assert.AreEqual("abcd-1234", obj.ID);
            Assert.AreEqual(1, obj.CreatedTime);
            Assert.AreEqual(1, obj.ModifedTime);

            client.AddResponse(201, "{\"createdAt\" : 1, \"modifiedAt\" : 1}", "1");
            // set etag to null
            SDKTestHack.SetField(obj, "mEtag", null);
            obj.SaveAllFields(false);
        }
        public void Test_0200_Delete()
        {
            Kii.Initialize("appId", "appKey", Kii.Site.US);
            MockHttpClientFactory factory = new MockHttpClientFactory();

            Kii.HttpClientFactory = factory;

            // set response
            MockHttpClient client = factory.Client;

            this.SetStandardSaveResponse(client);

            KiiObject obj = Kii.Bucket("test").NewKiiObject();

            obj["name"] = "Kii";
            obj["age"]  = 18;

            obj.Save();

            Assert.AreEqual("d8dc9f29-0fb9-48be-a80c-ec60fddedb54", obj.ID);
            Assert.AreEqual(1337039114613, obj.CreatedTime);
            Assert.AreEqual(1337039114613, obj.ModifedTime);
            // set body content-type
            SDKTestHack.SetField(obj, "mBodyContentType", "text/plain");

            // set Response
            client.AddResponse(204, "");

            obj.Delete();
            Assert.AreEqual(-1, obj.CreatedTime);
            Assert.AreEqual(-1, obj.ModifedTime);
            Assert.AreEqual(null, obj.Uri);
            Assert.IsNull(obj.BodyContentType);
        }
Beispiel #5
0
        public void Test_Login_With_TokenExpiration_Negative()
        {
            Kii.Initialize(APP_ID, APP_KEY, Kii.Site.US);

            // mock http client
            MockHttpClientFactory factory = new MockHttpClientFactory();

            Kii.HttpClientFactory = factory;
            MockHttpClient client = factory.Client;

            // set login response
            client.AddResponse(200,
                               "{" +
                               "\"id\" : \"efgh\"," +
                               "\"access_token\" : \"dummyToken\"," +
                               "\"expires_in\" : -9223372036854775" +
                               "}");

            // set refresh response
            client.AddResponse(200,
                               "{" +
                               "\"id\" : \"efgh\"," +
                               "\"username\" : \"dummyUser\"" +
                               "}");

            // set access token expiration to negative
            FieldInfo fieldInfo = typeof(Kii).GetField("INSTANCE", BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
            Kii       kii       = (Kii)fieldInfo.GetValue(null);

            SDKTestHack.SetField(kii, "mAccessTokenExpiration", -1L);
            Assert.AreEqual(-1L, Kii.AccessTokenExpiration);

            // perform login.
            Assert.IsNull(KiiUser.CurrentUser);
            KiiUser.LogIn("dummyUser", "111111");
            Assert.IsNotNull(KiiUser.CurrentUser);
            IDictionary tokenBundle = KiiUser.CurrentUser.GetAccessTokenDictionary();

            Assert.AreEqual("dummyToken", tokenBundle["access_token"]);
            Assert.AreEqual(DateTime.MinValue, tokenBundle["expires_at"]);

            // verify login request
            string url = Utils.Path(ConstantValues.DEFAULT_BASE_URL, "oauth2", "token");

            Assert.AreEqual(url, client.RequestUrl[0]);
            Assert.AreEqual(KiiHttpMethod.POST, client.RequestMethod[0]);
            MockHttpHeaderList headerList = client.RequestHeader[0];

            Assert.AreEqual(APP_ID, headerList["X-Kii-AppID"]);
            Assert.AreEqual(APP_KEY, headerList["X-Kii-AppKey"]);
            Assert.IsTrue(headerList["X-Kii-SDK"].StartsWith("sn=cs;sv="));

            // verify body.
            JsonObject requestBody = new JsonObject(client.RequestBody[0]);

            Assert.AreEqual(2, requestBody.Length());
            Assert.AreEqual("dummyUser", requestBody.GetString("username"));
            Assert.AreEqual("111111", requestBody.GetString("password"));
        }
Beispiel #6
0
        public void SetUp()
        {
            Kii.Initialize(AppConst.APP_ID, AppConst.APP_KEY, AppConst.APP_SITE);
            KiiUser user = KiiUser.UserWithID("user1234");

            SDKTestHack.SetField(Kii.Instance, "mLoginUser", user);
            KiiCloudEngine.UpdateAccessToken("token1234");
        }
        public void Test_0508_AddAndRemoveUser_null_KiiUser_instance()
        {
            // Prepare KiiUser for member
            KiiUser memberUser1 = KiiUser.CreateByUri(new Uri("kiicloud://users/" + TextUtils.generateUUID()));
            KiiUser memberUser2 = KiiUser.CreateByUri(new Uri("kiicloud://users/" + TextUtils.generateUUID()));
            KiiUser nullUser    = null;

            // Prepare group
            string   groupName = TextUtils.randomAlphaNumeric(10);
            string   groupID   = TextUtils.randomAlphaNumeric(26);
            KiiGroup group     = Kii.Group(groupName);

            SDKTestHack.SetField(group, "mId", groupID);
            SDKTestHack.SetField(group, "mOwnerId", TextUtils.generateUUID());
            group.AddUser(memberUser1);
            group.RemoveUser(memberUser2);
            // Check value
            HashSet <KiiUser> addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            HashSet <KiiUser> removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");

            Assert.AreEqual(1, addUsers.Count);
            Assert.AreEqual(1, removeUsers.Count);

            // Add user
            try
            {
                group.AddUser(nullUser);
                Assert.Fail("Should throw ArgumentException");
            }
            catch (ArgumentException)
            {
                // Pass
            }
            // Check value
            addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");
            Assert.AreEqual(1, addUsers.Count);
            Assert.AreEqual(1, removeUsers.Count);

            // Remove user
            try
            {
                group.RemoveUser(nullUser);
                Assert.Fail("Should throw ArgumentException");
            }
            catch (ArgumentException)
            {
                // Pass
            }
            // Check value
            addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");
            Assert.AreEqual(1, addUsers.Count);
            Assert.AreEqual(1, removeUsers.Count);
        }
        public void Test_2_22_CreateWithUri_InCloud_Patch_Overwrite_EtagNone()
        {
            Kii.Initialize("appId", "appKey", Kii.Site.US);
            MockHttpClientFactory factory = new MockHttpClientFactory();

            Kii.HttpClientFactory = factory;
            string objId = "abcd-1234";

            // prepare response
            MockHttpClient client = factory.Client;

            client.AddResponse(201, "{\"createdAt\" : 1, \"modifiedAt\" : 1}", "1");

            // save object to cloud
            KiiObject obj = KiiObject.CreateByUri(new Uri("kiicloud://buckets/test/objects/" + objId));

            obj["key"] = "value";
            obj.SaveAllFields(true);
            Assert.AreEqual("abcd-1234", obj.ID);
            Assert.AreEqual(1, obj.CreatedTime);
            Assert.AreEqual(1, obj.ModifedTime);
            string etag = (string)SDKTestHack.GetField(obj, "mEtag");

            Assert.AreEqual("1", etag);

            // set etag to null
            SDKTestHack.SetField(obj, "mEtag", null);

            client.AddResponse(201, "{\"_created\" : 1, \"_modified\" : 1}");
            obj["key1"] = "value1";

            // object save successfully as Overwrite is true.
            obj.Save(true);
            Assert.AreEqual("abcd-1234", obj.ID);
            Assert.AreEqual(1, obj.CreatedTime);
            Assert.AreEqual(1, obj.ModifedTime);

            // request contains x-http-method-override
            string url = Utils.Path(ConstantValues.DEFAULT_BASE_URL, "apps", "appId", "buckets", "test", "objects", objId);

            Assert.AreEqual(url, client.RequestUrl[1]);
            Assert.AreEqual(KiiHttpMethod.POST, client.RequestMethod[1]);
            MockHttpHeaderList headerList = client.RequestHeader[1];

            Assert.AreEqual("appId", headerList["X-Kii-AppID"]);
            Assert.AreEqual("appKey", headerList["X-Kii-AppKey"]);
            Assert.IsTrue(headerList["X-Kii-SDK"].StartsWith("sn=cs;sv="));
            Assert.AreEqual("PATCH", headerList["X-HTTP-Method-Override"]);
            string     reqBody          = "{\"key1\" : \"value1\"}";
            JsonObject expectedBodyJson = new JsonObject(reqBody);
            JsonObject actualBodyJson   = new JsonObject(client.RequestBody[1]);

            KiiAssertion.AssertJson(expectedBodyJson, actualBodyJson);
        }
        public void Test_3_16_CreateWithNoId_InCloud_NoPatch_Overwrite_EtagNone()
        {
            Kii.Initialize("appId", "appKey", Kii.Site.US);
            MockHttpClientFactory factory = new MockHttpClientFactory();

            Kii.HttpClientFactory = factory;

            // set response
            MockHttpClient client = factory.Client;

            client.AddResponse(201, "{\"objectID\" : \"abcd-1234\", \"createdAt\" : 1, \"modifiedAt\" : 1}", "1");

            KiiObject obj = Kii.Bucket("test").NewKiiObject();

            obj["key"] = "value";
            obj.SaveAllFields(false);
            Assert.AreEqual("abcd-1234", obj.ID);
            Assert.AreEqual(1, obj.CreatedTime);
            Assert.AreEqual(1, obj.ModifedTime);

            // Set Etag to null
            SDKTestHack.SetField(obj, "mEtag", null);
            client.AddResponse(201, "{\"createdAt\" : 1, \"modifiedAt\" : 1}", "1");

            // save successful as overwrite is true.
            obj.SaveAllFields(true);
            Assert.AreEqual("abcd-1234", obj.ID);
            Assert.AreEqual(1, obj.CreatedTime);
            Assert.AreEqual(1, obj.ModifedTime);

            // check request
            string url = Utils.Path(ConstantValues.DEFAULT_BASE_URL, "apps", "appId", "buckets", "test", "objects", "abcd-1234");

            Assert.AreEqual(url, client.RequestUrl[1]);
            Assert.AreEqual(KiiHttpMethod.PUT, client.RequestMethod[1]);
            MockHttpHeaderList headerList = client.RequestHeader[1];

            Assert.AreEqual("appId", headerList["X-Kii-AppID"]);
            Assert.AreEqual("appKey", headerList["X-Kii-AppKey"]);
            Assert.IsTrue(headerList["X-Kii-SDK"].StartsWith("sn=cs;sv="));
            string     reqBody          = "{ \"key\" : \"value\"}";
            JsonObject expectedBodyJson = new JsonObject(reqBody);
            JsonObject actualBodyJson   = new JsonObject(client.RequestBody[1]);

            KiiAssertion.AssertJson(expectedBodyJson, actualBodyJson);
        }
        public void Test_1_6_DeleteBody()
        {
            Kii.Initialize("appId", "appKey", Kii.Site.US);
            MockHttpClientFactory factory = new MockHttpClientFactory();

            Kii.HttpClientFactory = factory;

            // set response
            MockHttpClient client = factory.Client;

            this.SetStandardResponse(client);

            KiiObject obj = KiiObject.CreateByUri(new Uri("kiicloud://buckets/images/objects/object1234"));

            // set body content-type
            SDKTestHack.SetField(obj, "mBodyContentType", "text/plain");

            obj.DeleteBody();

            // check body content-type is cleared.
            Assert.IsNull(obj.BodyContentType);
        }
        public void Test_0505_AddAndRemoveUser_same_KiiUser_instance()
        {
            // Prepare KiiUser for member
            KiiUser memberUser1 = KiiUser.CreateByUri(new Uri("kiicloud://users/" + TextUtils.generateUUID()));
            KiiUser memberUser2 = KiiUser.CreateByUri(new Uri("kiicloud://users/" + TextUtils.generateUUID()));
            KiiUser memberUser3 = KiiUser.CreateByUri(new Uri("kiicloud://users/" + TextUtils.generateUUID()));

            // Prepare group
            string   groupName = TextUtils.randomAlphaNumeric(10);
            string   groupID   = TextUtils.randomAlphaNumeric(26);
            KiiGroup group     = Kii.Group(groupName);

            SDKTestHack.SetField(group, "mId", groupID);
            SDKTestHack.SetField(group, "mOwnerId", TextUtils.generateUUID());
            group.AddUser(memberUser1);
            group.RemoveUser(memberUser2);
            // Check value
            HashSet <KiiUser> addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            HashSet <KiiUser> removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");

            Assert.AreEqual(1, addUsers.Count);
            Assert.AreEqual(1, removeUsers.Count);

            // Add user
            group.AddUser(memberUser3);
            // Check value
            addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");
            Assert.AreEqual(2, addUsers.Count);
            Assert.AreEqual(1, removeUsers.Count);

            // Add user again
            group.AddUser(memberUser3);
            // Check value
            addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");
            Assert.AreEqual(2, addUsers.Count);
            Assert.AreEqual(1, removeUsers.Count);

            // Remove user
            group.RemoveUser(memberUser3);
            // Check value
            addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");
            Assert.AreEqual(1, addUsers.Count);
            Assert.AreEqual(2, removeUsers.Count);

            // Remove user again
            group.RemoveUser(memberUser3);
            // Check value
            addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");
            Assert.AreEqual(1, addUsers.Count);
            Assert.AreEqual(2, removeUsers.Count);

            // Add user
            group.AddUser(memberUser3);
            // Check value
            addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");
            Assert.AreEqual(2, addUsers.Count);
            Assert.AreEqual(1, removeUsers.Count);
        }
        public void Test_0502_CreateGroup_with_member()
        {
            // Create test user for group owner
            string  userID = TextUtils.generateUUID();
            KiiUser user   = KiiUser.CreateByUri(new Uri("kiicloud://users/" + userID));

            SDKTestHack.SetField(Kii.Instance, "mLoginUser", user);
            string authToken = TextUtils.generateUUID();

            KiiCloudEngine.UpdateAccessToken(authToken);

            // Prepare KiiUser for member
            string  memberID = TextUtils.generateUUID();
            KiiUser member   = KiiUser.CreateByUri(new Uri("kiicloud://users/" + memberID));

            // Prepare group
            string   groupName = TextUtils.randomAlphaNumeric(10);
            KiiGroup group     = Kii.Group(groupName, new List <KiiUser>()
            {
                member
            });

            // Check value
            HashSet <KiiUser> addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            HashSet <KiiUser> removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");

            Assert.AreEqual(1, addUsers.Count);
            Assert.AreEqual(0, removeUsers.Count);

            // Prepare mock response for creating group
            string     groupID   = TextUtils.randomAlphaNumeric(26);
            JsonObject resEntity = new JsonObject(new Dictionary <string, object>()
            {
                { "groupID", groupID },
                { "notFoundUsers", new JsonArray() }
            });

            client.AddResponse(201, resEntity.ToString());

            // Save group
            group.Save();

            // Verify request
            Assert.AreEqual(1, client.RequestUrl.Count);
            Assert.AreEqual(1, client.RequestHeader.Count);
            string requestUrl = AppUtil.getUrlOfSite(AppConst.APP_SITE, AppConst.APP_ID, "groups");

            Assert.AreEqual(requestUrl, client.RequestUrl[0]);
            Assert.AreEqual("POST", client.RequestMethod[0].ToString());
            IList <MockHttpHeaderList> headers = client.RequestHeader;

            Assert.AreEqual(AppConst.APP_ID, client.RequestHeader[0]["X-Kii-AppID"]);
            Assert.AreEqual(AppConst.APP_KEY, client.RequestHeader[0]["X-Kii-AppKey"]);
            Assert.AreEqual("Bearer " + authToken, client.RequestHeader[0]["Authorization"]);

            JsonObject requestBody = new JsonObject(client.RequestBody[0]);

            Assert.AreEqual(3, requestBody.Length());
            Assert.AreEqual(groupName, requestBody.GetString("name"));
            Assert.AreEqual(userID, requestBody.GetString("owner"));
            Assert.AreEqual(1, requestBody.GetJsonArray("members").Length());
            Assert.AreEqual(memberID, requestBody.GetJsonArray("members").GetString(0));

            // Verify
            Assert.AreEqual(groupID, group.ID);
            Assert.AreEqual(user.ID, group.Owner.ID);

            addUsers    = (HashSet <KiiUser>)SDKTestHack.GetField(group, "addUsers");
            removeUsers = (HashSet <KiiUser>)SDKTestHack.GetField(group, "removeUsers");
            Assert.AreEqual(0, addUsers.Count);
            Assert.AreEqual(0, removeUsers.Count);
        }
Beispiel #13
0
        private IEnumerator TestStep()
        {
            string  username = StringUtils.RandomAlphabetic(20);
            string  password = StringUtils.RandomAlphabetic(20);
            KiiUser user     = KiiUser.BuilderWithName(username).Build();
            var     task     = RegisterUser(user, password, (KiiUser u, Exception e) => {
                if (e != null)
                {
                    throw new TestFailException();
                }
                Debug.Log("Register user.");
            });

            yield return(StartCoroutine(task));

            // Create object
            string    bucketName = StringUtils.RandomAlphabetic(10);
            string    objectId   = StringUtils.RandomAlphabetic(10);
            KiiBucket bucket     = user.Bucket(bucketName);
            KiiObject obj        = bucket.NewKiiObject(objectId);
            string    objKey     = "KeyA";
            string    objValue   = "ValueA";

            obj [objKey] = objValue;

            Exception         exp      = null;
            bool              endFlag  = false;
            KiiObjectCallback callback = (KiiObject obj1, Exception e) => {
                exp     = e;
                endFlag = true;
            };

            obj.SaveAllFields(true, callback);
            while (!endFlag)
            {
                yield return(new WaitForSeconds(1));
            }
            if (exp != null)
            {
                throw new TestFailException();
            }
            Debug.Log("object created");

            // refresh
            endFlag = false;
            exp     = null;
            obj.Refresh(callback);
            while (!endFlag)
            {
                yield return(new WaitForSeconds(1));
            }
            if (exp != null)
            {
                throw new TestFailException();
            }
            Debug.Log("object refreshed");

            // Update with patch
            obj [objKey] = "UpdateA";
            SDKTestHack.SetField(obj, "mEtag", "999");
            endFlag = false;
            exp     = null;
            obj.SaveAllFields(false, callback);
            while (!endFlag)
            {
                yield return(new WaitForSeconds(1));
            }
            if (exp == null)
            {
                throw new TestFailException();
            }
            if (409 != ((CloudException)exp).Status)
            {
                throw new TestFailException();
            }
            Debug.Log("object updated has expected conflict response .");
            resultFlag = true;
        }