@@ -21,7 +21,7 @@ class TestUpdateHierarchy extends BaseSpec {
overridedefbeforeAll():Unit={
super.beforeAll()
graphDb.execute("UNWIND [{ownershipType:[\"createdBy\"],code:\"citrusCode\",channel:\"in.ekstep\",language:[\"English\"],mimeType:\"application/vnd.ekstep.content-collection\",idealScreenSize:\"normal\",createdOn:\"2020-01-29T17:45:55.620+0530\",contentDisposition:\"inline\",contentEncoding:\"gzip\",lastUpdatedOn:\"2020-01-29T17:46:35.471+0530\",contentType:\"TextBook\",dialcodeRequired:\"No\",identifier:\"do_11294581887465881611\",audience:[\"Learner\"],lastStatusChangedOn:\"2020-01-29T17:45:55.620+0530\",os:[\"All\"],visibility:\"Default\",IL_SYS_NODE_TYPE:\"DATA_NODE\",nodeType:\"DATA_NODE\",mediaType:\"content\",osId:\"org.ekstep.quiz.app\",version:2,versionKey:\"1580300195471\",idealScreenDensity:\"hdpi\",license:\"CC BY 4.0\",framework:\"NCF\",compatibilityLevel:1,IL_FUNC_OBJECT_TYPE:\"Content\",name:\"Update Hierarchy Test_03\",IL_UNIQUE_ID:\"do_11294581887465881611\",status:\"Draft\"},\n{ownershipType:[\"createdBy\"],code:\"citrusCode\",channel:\"in.ekstep\",description:\"New text book description_01\",language:[\"English\"],mimeType:\"application/vnd.ekstep.content-collection\",idealScreenSize:\"normal\",createdOn:\"2020-02-03T12:45:30.605+0530\",contentDisposition:\"inline\",contentEncoding:\"gzip\",lastUpdatedOn:\"2020-02-03T12:46:01.439+0530\",contentType:\"TextBook\",dialcodeRequired:\"No\",identifier:\"do_112949210157768704111\",audience:[\"Learner\"],lastStatusChangedOn:\"2020-02-03T12:45:30.605+0530\",os:[\"All\"],visibility:\"Default\",IL_SYS_NODE_TYPE:\"DATA_NODE\",nodeType:\"DATA_NODE\",childNodes:[\"do_112949210410000384114\"],mediaType:\"content\",osId:\"org.ekstep.quiz.app\",version:2,versionKey:\"1580714161439\",license:\"CC BY 4.0\",idealScreenDensity:\"hdpi\",depth:0,framework:\"NCF\",compatibilityLevel:1,IL_FUNC_OBJECT_TYPE:\"Content\",name:\"Update Hierarchy Test_01\",IL_UNIQUE_ID:\"do_112949210157768704111\",status:\"Draft\"},\n{ownershipType:[\"createdBy\"],previewUrl:\"https://www.youtube.com/watch?v=JEjUtGkUqus\",downloadUrl:\"https://ntpproductionall.blob.core.windows.net/ntp-content-production/ecar_files/do_31250856200414822416938/mh_chapter-1_science-part-2_grade-10_2_1539192600492_do_31250856200414822416938_2.0.ecar\",channel:\"0123221617357783046602\",showNotification:true,language:[\"English\"],variants:\"{\\\"spine\\\":{\\\"ecarUrl\\\":\\\"https://ntpproductionall.blob.core.windows.net/ntp-content-production/ecar_files/do_31250856200414822416938/mh_chapter-1_science-part-2_grade-10_2_1539192600579_do_31250856200414822416938_2.0_spine.ecar\\\",\\\"size\\\":29518}}\",mimeType:\"video/x-youtube\",appIcon:\"https://ntpproductionall.blob.core.windows.net/ntp-content-production/content/do_31250856200414822416938/artifact/logo_4221_1513150964_1513150964262.thumb.jpg\",appId:\"prod.diksha.app\",artifactUrl:\"https://www.youtube.com/watch?v=JEjUtGkUqus\",contentEncoding:\"identity\",contentType:\"Resource\",lastUpdatedBy:\"ekstep\",audience:[\"Learner\"],visibility:\"Default\",consumerId:\"89490534-126f-4f0b-82ac-3ff3e49f3468\",mediaType:\"content\",osId:\"org.ekstep.quiz.app\",lastPublishedBy:\"ekstep\",version:1,pragma:[\"external\"],license:\"CC BY-SA 4.0\",prevState:\"Live\",size:29519,lastPublishedOn:\"2018-10-10T17:30:00.491+0000\",IL_FUNC_OBJECT_TYPE:\"Content\",name:\"MH_Chapter 1_Science Part 2_Grade 10_2\",attributions:[\"MSCERT\"],status:\"Live\",code:\"b2099ea5-0070-4930-ae13-b08aa83e5853\",description:\"अानुवांशिकता और उत्क्रांती\",streamingUrl:\"https://www.youtube.com/watch?v=JEjUtGkUqus\",posterImage:\"https://ntpproductionall.blob.core.windows.net/ntp-content-production/content/do_31239573269507276815296/artifact/logo_4221_1513150964_1513150964262.jpg\",idealScreenSize:\"normal\",createdOn:\"0021-02-04T08:05:49.480+0000\",contentDisposition:\"online\",lastUpdatedOn:\"25182518-10-10T17:29:59.456+0000\",SYS_INTERNAL_LAST_UPDATED_ON:\"2019-07-31T01:57:26.148+0000\",dialcodeRequired:\"No\",lastStatusChangedOn:\"2019-06-17T05:41:05.507+0000\",createdFor:[\"0123221617357783046602\"],creator:\"Alaka Potdar\",os:[\"All\"],IL_SYS_NODE_TYPE:\"DATA_NODE\",nodeType:\"DATA_NODE\",pkgVersion:2,versionKey:\"1539192599456\",idealScreenDensity:\"hdpi\",framework:\"NCF\",s3Key:\"ecar_files/do_31250856200414822416938/mh_chapter-1_science-part-2_grade-10_2_1539192600492_do_31250856200414822416938_2.0.ecar\",me_averageRating:3,lastSubmittedOn:\"2018-05-21T17:37:16.466+0000\",createdBy:\"c5d09e49-6f1d-474b-b6cc-2e590ae15ef8\",compatibilityLevel:4,IL_UNIQUE_ID:\"do_31250856200414822416938\",resourceType:\"Learn\"},\n{copyright:\"\",code:\"org.ekstep.asset.Pant.1773380908\",sources:\"\",channel:\"in.ekstep\",downloadUrl:\"https://ekstep-public-prod.s3-ap-south-1.amazonaws.com/content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.png\",language:[\"English\"],mimeType:\"image/png\",variants:\"{\\\"high\\\":\\\"https://ekstep-public-prod.s3-ap-south-1.amazonaws.com/content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.png\\\",\\\"low\\\":\\\"https://ekstep-public-prod.s3-ap-south-1.amazonaws.com/content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.low.png\\\",\\\"medium\\\":\\\"https://ekstep-public-prod.s3-ap-south-1.amazonaws.com/content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.medium.png\\\"}\",idealScreenSize:\"normal\",createdOn:\"2017-01-02T07:02:31.021+0000\",contentDisposition:\"inline\",artifactUrl:\"https://ekstep-public-prod.s3-ap-south-1.amazonaws.com/content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.png\",contentEncoding:\"identity\",lastUpdatedOn:\"2017-03-10T20:48:09.283+0000\",contentType:\"Asset\",owner:\"\",os:[\"All\"],visibility:\"Default\",IL_SYS_NODE_TYPE:\"DATA_NODE\",nodeType:\"DATA_NODE\",portalOwner:\"658\",mediaType:\"image\",osId:\"org.ekstep.quiz.app\",ageGroup:[\"5-6\"],versionKey:\"1489178889283\",license:\"CC BY-SA 4.0\",idealScreenDensity:\"hdpi\",framework:\"NCF\",s3Key:\"content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.png\",size:167939,createdBy:\"658\",compatibilityLevel:1,IL_FUNC_OBJECT_TYPE:\"Content\",name:\"Pant\",publisher:\"\",IL_UNIQUE_ID:\"do_30109819\",status:\"Live\"}] as row CREATE (n:domain) SET n += row")
graphDb.execute("UNWIND [{ownershipType:[\"createdBy\"],code:\"citrusCode\",channel:\"in.ekstep\",language:[\"English\"],mimeType:\"application/vnd.ekstep.content-collection\",idealScreenSize:\"normal\",createdOn:\"2020-01-29T17:45:55.620+0530\",contentDisposition:\"inline\",contentEncoding:\"gzip\",lastUpdatedOn:\"2020-01-29T17:46:35.471+0530\",contentType:\"TextBook\",dialcodeRequired:\"No\",identifier:\"do_11294581887465881611\",audience:[\"Learner\"],lastStatusChangedOn:\"2020-01-29T17:45:55.620+0530\",os:[\"All\"],visibility:\"Default\",IL_SYS_NODE_TYPE:\"DATA_NODE\",nodeType:\"DATA_NODE\",mediaType:\"content\",osId:\"org.ekstep.quiz.app\",version:2,versionKey:\"1580300195471\",idealScreenDensity:\"hdpi\",license:\"CC BY 4.0\",framework:\"NCF\",compatibilityLevel:1,IL_FUNC_OBJECT_TYPE:\"Content\",name:\"Update Hierarchy Test_03\",IL_UNIQUE_ID:\"do_11294581887465881611\",status:\"Draft\"},\n{ownershipType:[\"createdBy\"],code:\"citrusCode\",channel:\"in.ekstep\",description:\"New text book description_01\",language:[\"English\"],mimeType:\"application/vnd.ekstep.content-collection\",idealScreenSize:\"normal\",createdOn:\"2020-02-03T12:45:30.605+0530\",contentDisposition:\"inline\",contentEncoding:\"gzip\",lastUpdatedOn:\"2020-02-03T12:46:01.439+0530\",contentType:\"TextBook\",dialcodeRequired:\"No\",identifier:\"do_112949210157768704111\",audience:[\"Learner\"],lastStatusChangedOn:\"2020-02-03T12:45:30.605+0530\",os:[\"All\"],visibility:\"Default\",IL_SYS_NODE_TYPE:\"DATA_NODE\",nodeType:\"DATA_NODE\",childNodes:[\"do_112949210410000384114\"],mediaType:\"content\",osId:\"org.ekstep.quiz.app\",version:2,versionKey:\"1580714161439\",license:\"CC BY 4.0\",idealScreenDensity:\"hdpi\",depth:0,framework:\"NCF\",compatibilityLevel:1,IL_FUNC_OBJECT_TYPE:\"Content\",name:\"Update Hierarchy Test_01\",IL_UNIQUE_ID:\"do_112949210157768704111\",status:\"Draft\"},\n{ownershipType:[\"createdBy\"],previewUrl:\"https://www.youtube.com/watch?v=JEjUtGkUqus\",downloadUrl:\"https://ntpproductionall.blob.core.windows.net/ntp-content-production/ecar_files/do_31250856200414822416938/mh_chapter-1_science-part-2_grade-10_2_1539192600492_do_31250856200414822416938_2.0.ecar\",channel:\"0123221617357783046602\",showNotification:true,language:[\"English\"],variants:\"{\\\"spine\\\":{\\\"ecarUrl\\\":\\\"https://ntpproductionall.blob.core.windows.net/ntp-content-production/ecar_files/do_31250856200414822416938/mh_chapter-1_science-part-2_grade-10_2_1539192600579_do_31250856200414822416938_2.0_spine.ecar\\\",\\\"size\\\":29518}}\",mimeType:\"video/x-youtube\",appIcon:\"https://ntpproductionall.blob.core.windows.net/ntp-content-production/content/do_31250856200414822416938/artifact/logo_4221_1513150964_1513150964262.thumb.jpg\",appId:\"prod.diksha.app\",artifactUrl:\"https://www.youtube.com/watch?v=JEjUtGkUqus\",contentEncoding:\"identity\",contentType:\"Resource\",lastUpdatedBy:\"ekstep\",audience:[\"Learner\"],visibility:\"Default\",consumerId:\"89490534-126f-4f0b-82ac-3ff3e49f3468\",mediaType:\"content\",osId:\"org.ekstep.quiz.app\",lastPublishedBy:\"ekstep\",version:1,pragma:[\"external\"],license:\"CC BY-SA 4.0\",prevState:\"Live\",size:29519,lastPublishedOn:\"2018-10-10T17:30:00.491+0000\",IL_FUNC_OBJECT_TYPE:\"Content\",name:\"MH_Chapter 1_Science Part 2_Grade 10_2\",attributions:[\"MSCERT\"],status:\"Live\",code:\"b2099ea5-0070-4930-ae13-b08aa83e5853\",description:\"अानुवांशिकता और उत्क्रांती\",streamingUrl:\"https://www.youtube.com/watch?v=JEjUtGkUqus\",posterImage:\"https://ntpproductionall.blob.core.windows.net/ntp-content-production/content/do_31239573269507276815296/artifact/logo_4221_1513150964_1513150964262.jpg\",idealScreenSize:\"normal\",createdOn:\"0021-02-04T08:05:49.480+0000\",contentDisposition:\"online\",lastUpdatedOn:\"25182518-10-10T17:29:59.456+0000\",SYS_INTERNAL_LAST_UPDATED_ON:\"2019-07-31T01:57:26.148+0000\",dialcodeRequired:\"No\",lastStatusChangedOn:\"2019-06-17T05:41:05.507+0000\",createdFor:[\"0123221617357783046602\"],creator:\"Alaka Potdar\",os:[\"All\"],IL_SYS_NODE_TYPE:\"DATA_NODE\",nodeType:\"DATA_NODE\",pkgVersion:2,versionKey:\"1539192599456\",idealScreenDensity:\"hdpi\",framework:\"NCF\",s3Key:\"ecar_files/do_31250856200414822416938/mh_chapter-1_science-part-2_grade-10_2_1539192600492_do_31250856200414822416938_2.0.ecar\",me_averageRating:3,lastSubmittedOn:\"2018-05-21T17:37:16.466+0000\",createdBy:\"c5d09e49-6f1d-474b-b6cc-2e590ae15ef8\",compatibilityLevel:4,IL_UNIQUE_ID:\"do_31250856200414822416938\",resourceType:\"Learn\"},\n{copyright:\"\",code:\"org.ekstep.asset.Pant.1773380908\",sources:\"\",channel:\"in.ekstep\",downloadUrl:\"https://ekstep-public-prod.s3-ap-south-1.amazonaws.com/content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.png\",language:[\"English\"],mimeType:\"image/png\",variants:\"{\\\"high\\\":\\\"https://ekstep-public-prod.s3-ap-south-1.amazonaws.com/content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.png\\\",\\\"low\\\":\\\"https://ekstep-public-prod.s3-ap-south-1.amazonaws.com/content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.low.png\\\",\\\"medium\\\":\\\"https://ekstep-public-prod.s3-ap-south-1.amazonaws.com/content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.medium.png\\\"}\",idealScreenSize:\"normal\",createdOn:\"2017-01-02T07:02:31.021+0000\",contentDisposition:\"inline\",artifactUrl:\"https://ekstep-public-prod.s3-ap-south-1.amazonaws.com/content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.png\",contentEncoding:\"identity\",lastUpdatedOn:\"2017-03-10T20:48:09.283+0000\",contentType:\"Asset\",owner:\"\",os:[\"All\"],visibility:\"Default\",IL_SYS_NODE_TYPE:\"DATA_NODE\",nodeType:\"DATA_NODE\",portalOwner:\"658\",mediaType:\"image\",osId:\"org.ekstep.quiz.app\",ageGroup:[\"5-6\"],versionKey:\"1489178889283\",license:\"CC BY-SA 4.0\",idealScreenDensity:\"hdpi\",framework:\"NCF\",s3Key:\"content/do_30109819/artifact/clothes-1294974_960_720_658_1483340550_1483340551056.png\",size:167939,createdBy:\"658\",compatibilityLevel:1,IL_FUNC_OBJECT_TYPE:\"Content\",name:\"Pant\",publisher:\"\",IL_UNIQUE_ID:\"do_30109819\",status:\"Live\"},\n{ownershipType:[\"createdBy\"],code:\"citrusCode\",channel:\"in.ekstep\",language:[\"English\"],mimeType:\"application/vnd.ekstep.content-collection\",idealScreenSize:\"normal\",createdOn:\"2020-01-29T17:45:55.620+0530\",contentDisposition:\"inline\",contentEncoding:\"gzip\",lastUpdatedOn:\"2020-01-29T17:46:35.471+0530\",contentType:\"TextBook\",dialcodeRequired:\"No\",identifier:\"do_test_book_1\",audience:[\"Learner\"],lastStatusChangedOn:\"2020-01-29T17:45:55.620+0530\",os:[\"All\"],visibility:\"Default\",IL_SYS_NODE_TYPE:\"DATA_NODE\",nodeType:\"DATA_NODE\",mediaType:\"content\",osId:\"org.ekstep.quiz.app\",version:2,versionKey:\"1580300195471\",idealScreenDensity:\"hdpi\",license:\"CC BY 4.0\",framework:\"NCF\",compatibilityLevel:1,IL_FUNC_OBJECT_TYPE:\"Content\",name:\"Update Hierarchy Test For Origin Data\",IL_UNIQUE_ID:\"do_test_book_1\",status:\"Draft\"}] as row CREATE (n:domain) SET n += row")
valhierarchy="{\"do_test_book_1\":{\"name\":\"Update Hierarchy Test For Origin Data\",\"contentType\":\"TextBook\",\"children\":[\"TestBookUnit-01\",\"TestBookUnit-02\"],\"root\":true},\"TestBookUnit-01\":{\"name\":\"U-1\",\"contentType\":\"TextBookUnit\",\"children\":[],\"root\":false},\"TestBookUnit-02\":{\"name\":\"U-2\",\"contentType\":\"TextBookUnit\",\"children\":[],\"root\":false}}"