Implement Integration Testcases for XML Supported API's 74/139774/4
authorRudrangi Anupriya <ra00745022@techmahindra.com>
Thu, 9 Jan 2025 14:54:00 +0000 (20:24 +0530)
committerRudrangi Anupriya <ra00745022@techmahindra.com>
Fri, 10 Jan 2025 03:56:42 +0000 (09:26 +0530)
Issue-ID: CPS-2548
Change-Id: Icc7ffb66aabb03702355123c6d5c2eade0e7cb4a
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy
integration-test/src/test/groovy/org/onap/cps/integration/base/FunctionalSpecBase.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/DataServiceIntegrationSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/performance/base/CpsPerfTestBase.groovy
integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/DeletePerfTest.groovy
integration-test/src/test/resources/data/bookstore/bookstoreData.xml [new file with mode: 0644]

index 16b4460..e7ab5ed 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  ============LICENSE_START=======================================================
  *  Copyright (C) 2023-2024 Nordix Foundation
- *  Modifications Copyright (C) 2024 TechMahindra Ltd.
+ *  Modifications Copyright (C) 2024-2025 TechMahindra Ltd.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the 'License');
  *  you may not use this file except in compliance with the License.
@@ -46,6 +46,7 @@ import org.onap.cps.ri.repository.DataspaceRepository
 import org.onap.cps.ri.utils.SessionManager
 import org.onap.cps.api.exceptions.DataspaceNotFoundException
 import org.onap.cps.api.model.DataNode
+import static org.onap.cps.utils.ContentType.*
 import org.onap.cps.utils.JsonObjectMapper
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.beans.factory.annotation.Value
@@ -229,10 +230,10 @@ abstract class CpsIntegrationSpecBase extends Specification {
         return true
     }
 
-    def addAnchorsWithData(numberOfAnchors, dataspaceName, schemaSetName, anchorNamePrefix, data) {
+    def addAnchorsWithData(numberOfAnchors, dataspaceName, schemaSetName, anchorNamePrefix, data, contentType) {
         (1..numberOfAnchors).each {
             cpsAnchorService.createAnchor(dataspaceName, schemaSetName, anchorNamePrefix + it)
-            cpsDataService.saveData(dataspaceName, anchorNamePrefix + it, data.replace("Easons", "Easons-"+it.toString()), OffsetDateTime.now())
+            cpsDataService.saveData(dataspaceName, anchorNamePrefix + it, data.replace("Easons", "Easons-"+it.toString()), OffsetDateTime.now(), contentType)
         }
     }
 
index 6929a2b..50aef18 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  ============LICENSE_START=======================================================
  *  Copyright (C) 2023-2024 Nordix Foundation
- *  Modifications Copyright (C) 2022-2023 TechMahindra Ltd.
+ *  Modifications Copyright (C) 2022-2025 TechMahindra Ltd.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the 'License');
  *  you may not use this file except in compliance with the License.
 package org.onap.cps.integration.base
 
 import java.time.OffsetDateTime
+import static org.onap.cps.utils.ContentType.JSON
+import static org.onap.cps.utils.ContentType.XML
 
 abstract class FunctionalSpecBase extends CpsIntegrationSpecBase {
 
     def static FUNCTIONAL_TEST_DATASPACE_1 = 'functionalTestDataspace1'
     def static FUNCTIONAL_TEST_DATASPACE_2 = 'functionalTestDataspace2'
     def static FUNCTIONAL_TEST_DATASPACE_3 = 'functionalTestDataspace3'
-    def static NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DATA = 2
+    def static FUNCTIONAL_TEST_DATASPACE_4 = 'functionalTestDataspace4'
+    def static NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_JSON_DATA = 2
+    def static NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_XML_DATA = 1
     def static NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DELTA_DATA = 1
     def static BOOKSTORE_ANCHOR_1 = 'bookstoreAnchor1'
     def static BOOKSTORE_ANCHOR_2 = 'bookstoreAnchor2'
     def static BOOKSTORE_ANCHOR_3 = 'bookstoreSourceAnchor1'
     def static BOOKSTORE_ANCHOR_4 = 'copyOfSourceAnchor1'
     def static BOOKSTORE_ANCHOR_5 = 'bookstoreAnchorForDeltaReport1'
+    def static BOOKSTORE_ANCHOR_6 = 'bookstoreAnchorXml1'
 
     def static initialized = false
     def static bookstoreJsonData = readResourceDataFile('bookstore/bookstoreData.json')
+    def static bookstoreXmlData = readResourceDataFile('bookstore/bookstoreData.xml')
     def static bookstoreJsonDataForDeltaReport = readResourceDataFile('bookstore/bookstoreDataForDeltaReport.json')
 
     def setup() {
         if (!initialized) {
             setupBookstoreInfraStructure()
             addBookstoreData()
+            addXmlData()
             addDeltaData()
             initialized = true
         }
@@ -53,20 +60,26 @@ abstract class FunctionalSpecBase extends CpsIntegrationSpecBase {
         cpsDataspaceService.createDataspace(FUNCTIONAL_TEST_DATASPACE_1)
         cpsDataspaceService.createDataspace(FUNCTIONAL_TEST_DATASPACE_2)
         cpsDataspaceService.createDataspace(FUNCTIONAL_TEST_DATASPACE_3)
+        cpsDataspaceService.createDataspace(FUNCTIONAL_TEST_DATASPACE_4)
         createStandardBookStoreSchemaSet(FUNCTIONAL_TEST_DATASPACE_1)
         createStandardBookStoreSchemaSet(FUNCTIONAL_TEST_DATASPACE_2)
         createStandardBookStoreSchemaSet(FUNCTIONAL_TEST_DATASPACE_3)
+        createStandardBookStoreSchemaSet(FUNCTIONAL_TEST_DATASPACE_4)
     }
 
     def addBookstoreData() {
-        addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DATA, FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_SCHEMA_SET, 'bookstoreAnchor', bookstoreJsonData)
-        addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DATA, FUNCTIONAL_TEST_DATASPACE_2, BOOKSTORE_SCHEMA_SET, 'bookstoreAnchor', bookstoreJsonData)
+        addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_JSON_DATA, FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_SCHEMA_SET, 'bookstoreAnchor', bookstoreJsonData, JSON)
+        addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_JSON_DATA, FUNCTIONAL_TEST_DATASPACE_2, BOOKSTORE_SCHEMA_SET, 'bookstoreAnchor', bookstoreJsonData, JSON)
+    }
+
+    def addXmlData() {
+        addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_XML_DATA, FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_SCHEMA_SET, 'bookstoreAnchorXml', bookstoreXmlData, XML)
     }
 
     def addDeltaData() {
-        addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DELTA_DATA, FUNCTIONAL_TEST_DATASPACE_3, BOOKSTORE_SCHEMA_SET, 'bookstoreSourceAnchor', bookstoreJsonData)
-        addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DELTA_DATA, FUNCTIONAL_TEST_DATASPACE_3, BOOKSTORE_SCHEMA_SET, 'copyOfSourceAnchor', bookstoreJsonData)
-        addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DELTA_DATA, FUNCTIONAL_TEST_DATASPACE_3, BOOKSTORE_SCHEMA_SET, 'bookstoreAnchorForDeltaReport', bookstoreJsonDataForDeltaReport)
+        addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DELTA_DATA, FUNCTIONAL_TEST_DATASPACE_3, BOOKSTORE_SCHEMA_SET, 'bookstoreSourceAnchor', bookstoreJsonData, JSON)
+        addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DELTA_DATA, FUNCTIONAL_TEST_DATASPACE_3, BOOKSTORE_SCHEMA_SET, 'copyOfSourceAnchor', bookstoreJsonData, JSON)
+        addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DELTA_DATA, FUNCTIONAL_TEST_DATASPACE_3, BOOKSTORE_SCHEMA_SET, 'bookstoreAnchorForDeltaReport', bookstoreJsonDataForDeltaReport, JSON)
     }
 
     def restoreBookstoreDataAnchor(anchorNumber) {
@@ -76,4 +89,11 @@ abstract class FunctionalSpecBase extends CpsIntegrationSpecBase {
         cpsDataService.saveData(FUNCTIONAL_TEST_DATASPACE_1, anchorName, bookstoreJsonData.replace('Easons', 'Easons-'+anchorNumber.toString()), OffsetDateTime.now())
     }
 
+    def restoreBookstoreXmlDataAnchor(anchorNumber) {
+        def anchorName = 'bookstoreAnchorXml' + anchorNumber
+        cpsAnchorService.deleteAnchor(FUNCTIONAL_TEST_DATASPACE_4, anchorName)
+        cpsAnchorService.createAnchor(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_SCHEMA_SET, anchorName)
+        cpsDataService.saveData(FUNCTIONAL_TEST_DATASPACE_4, anchorName, bookstoreXmlData, OffsetDateTime.now(), XML)
+    }
+
 }
index 653a295..4823d58 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  ============LICENSE_START=======================================================
  *  Copyright (C) 2023-2024 Nordix Foundation
- *  Modifications Copyright (C) 2023-2024 TechMahindra Ltd.
+ *  Modifications Copyright (C) 2023-2025 TechMahindra Ltd.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the 'License');
  *  you may not use this file except in compliance with the License.
@@ -43,12 +43,14 @@ class DataServiceIntegrationSpec extends FunctionalSpecBase {
 
     CpsDataService objectUnderTest
     def originalCountBookstoreChildNodes
+    def originalCountXmlBookstoreChildNodes
     def originalCountBookstoreTopLevelListNodes
 
     def setup() {
         objectUnderTest = cpsDataService
         originalCountBookstoreChildNodes = countDataNodesInBookstore()
         originalCountBookstoreTopLevelListNodes = countTopLevelListDataNodesInBookstore()
+        originalCountXmlBookstoreChildNodes = countXmlDataNodesInBookstore()
     }
 
     def 'Read bookstore top-level container(s) using #fetchDescendantsOption.'() {
@@ -277,6 +279,17 @@ class DataServiceIntegrationSpec extends FunctionalSpecBase {
             assert originalCountBookstoreChildNodes == countDataNodesInBookstore()
     }
 
+    def 'Add and Delete list (element) XML data nodes.'() {
+        given: 'a new (categories) data nodes in XML'
+            def xml = '<categories><code>new1</code><name>SciFii</name></categories>'
+        and: 'saving the new list element'
+            objectUnderTest.saveListElements(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_ANCHOR_6, '/bookstore', xml, now, ContentType.XML)
+        when: 'deleting the new list element'
+            objectUnderTest.deleteListOrListElement(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_ANCHOR_6, '/bookstore/categories[@code="new1"]', now)
+        then: 'the original number of data nodes is restored'
+            assert originalCountXmlBookstoreChildNodes == countXmlDataNodesInBookstore()
+    }
+
     def 'Add and Delete a batch of list element data nodes.'() {
         given: 'two new (categories) data nodes in a single batch'
             def json = '{"categories": [ {"code":"new1"}, {"code":"new2"} ] }'
@@ -361,6 +374,29 @@ class DataServiceIntegrationSpec extends FunctionalSpecBase {
             'new code, new child'           | 'new'        | ', "books" : [ { "title": "New Book" } ]' || 2
     }
 
+    def 'Replace XML list content #scenario.'() {
+        given: 'the XML bookstore categories 1 exists and has at least 1 child'
+            assert countDataNodesInTree(objectUnderTest.getDataNodes(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_ANCHOR_6, '/bookstore/categories[@code=1]', DIRECT_CHILDREN_ONLY)) > 1
+        when: 'the XML categories list is replaced with just category "1" and a new child'
+            def xmlData = '''<bookstore xmlns="org:onap:cps:sample">
+                              <categories>
+                                  <code>1</code>
+                                  <books>
+                                  <title>New Book</title>
+                                  </books>
+                              </categories>
+                           </bookstore>'''
+            objectUnderTest.replaceListContent(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_ANCHOR_6, '/bookstore', xmlData, now, ContentType.XML)
+        then: 'the replaced XML category has one child'
+            assert 2 == countDataNodesInTree(objectUnderTest.getDataNodes(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_ANCHOR_6, '/bookstore/categories[@code=1]', DIRECT_CHILDREN_ONLY))
+        when: 'attempting to retrieve a non-existent category'
+            objectUnderTest.getDataNodes(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_ANCHOR_6, '/bookstore/categories[@code="2"]', DIRECT_CHILDREN_ONLY)
+        then: 'a datanode not found exception occurs'
+            thrown(DataNodeNotFoundException)
+        cleanup:
+            restoreBookstoreDataAnchor(1)
+    }
+
     def 'Update data node leaves for node that has no leaves (yet).'() {
         given: 'new (webinfo) datanode without leaves'
             def json = '{"webinfo": {} }'
@@ -430,6 +466,37 @@ class DataServiceIntegrationSpec extends FunctionalSpecBase {
             restoreBookstoreDataAnchor(2)
     }
 
+    def 'Update bookstore top-level XML container data node.'() {
+        given: 'Updated xml for bookstore data'
+            def xml = '<categories><code>1</code><name>Gothic</name></categories>'
+        when: 'updating the data node'
+            objectUnderTest.updateDataNodeAndDescendants(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_ANCHOR_6, '/bookstore', xml, now, ContentType.XML)
+        then: 'the updated data nodes are retrieved'
+            def result = objectUnderTest.getDataNodes(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_ANCHOR_6, '/bookstore/categories[@code=1]', DIRECT_CHILDREN_ONLY)
+        and: 'the leaf values are updated as expected'
+            assert result.leaves.'name'[0] == 'Gothic'
+        cleanup:
+            restoreBookstoreXmlDataAnchor(1)
+    }
+
+    def 'Update multiple XML data node leaves.'() {
+        given: 'XML for bookstore data with updated lang and price leaves'
+            def xmlData = '''<books>
+                      <title>2001: A Space Odyssey</title>
+                      <lang>english</lang>
+                      <authors>Iain M. Banks</authors>
+                      <editions>1994</editions>
+                      <price>995</price>
+                      </books> '''
+        when: 'updating node leaves'
+            objectUnderTest.updateNodeLeaves(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_ANCHOR_6, '/bookstore/categories[@code=1]', xmlData, now, ContentType.XML)
+        then: 'the updated data nodes are retrieved'
+            def result = cpsDataService.getDataNodes(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_ANCHOR_6, '/bookstore/categories[@code=1]/books[@title="2001: A Space Odyssey"]', INCLUDE_ALL_DESCENDANTS)
+        and: 'the leaf values are updated as expected'
+            assert result[0].leaves['lang'] == 'english'
+            assert result[0].leaves['price'] == 995
+    }
+
     def 'Order of leaf-list elements is preserved when "ordered-by user" is set in the YANG model.'() {
         given: 'Updated json for bookstore data'
             def jsonData =  "{'book-store:books':{'title':'Matilda', 'authors': ['beta', 'alpha', 'gamma', 'delta']}}"
@@ -648,4 +715,8 @@ class DataServiceIntegrationSpec extends FunctionalSpecBase {
     def countTopLevelListDataNodesInBookstore() {
         return countDataNodesInTree(objectUnderTest.getDataNodes(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_ANCHOR_1, '/', INCLUDE_ALL_DESCENDANTS))
     }
+
+    def countXmlDataNodesInBookstore() {
+        return countDataNodesInTree(objectUnderTest.getDataNodes(FUNCTIONAL_TEST_DATASPACE_4, BOOKSTORE_ANCHOR_6, '/bookstore', INCLUDE_ALL_DESCENDANTS))
+    }
 }
index 85faee3..e4d75aa 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  ============LICENSE_START=======================================================
  *  Copyright (C) 2023-2024 Nordix Foundation
- *  Modifications Copyright (C) 2023 TechMahindra Ltd
+ *  Modifications Copyright (C) 2023-2025 TechMahindra Ltd
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the 'License');
  *  you may not use this file except in compliance with the License.
@@ -297,7 +297,7 @@ class QueryServiceIntegrationSpec extends FunctionalSpecBase {
         and: 'correct anchors are queried'
             assert result.anchorName.toSet() == [BOOKSTORE_ANCHOR_1, BOOKSTORE_ANCHOR_2].toSet()
         and: 'the correct number of nodes is returned'
-            assert result.size() == expectedXpathsPerAnchor.size() * NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DATA
+            assert result.size() == expectedXpathsPerAnchor.size() * NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_JSON_DATA
         and: 'the queried nodes have expected xpaths'
             assert result.xpath.toSet() == expectedXpathsPerAnchor.toSet()
         where: 'the following data is used'
@@ -319,7 +319,7 @@ class QueryServiceIntegrationSpec extends FunctionalSpecBase {
         then: 'the correct dataspace was queried'
             assert result.dataspace.toSet() == [FUNCTIONAL_TEST_DATASPACE_1].toSet()
         and: 'correct number of datanodes are returned'
-            assert countDataNodesInTree(result) == expectedNumberOfNodesPerAnchor * NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DATA
+            assert countDataNodesInTree(result) == expectedNumberOfNodesPerAnchor * NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_JSON_DATA
         where: 'the following data is used'
             scenario | fetchDescendantsOption  || expectedNumberOfNodesPerAnchor
             'no'     | OMIT_DESCENDANTS        || 1
@@ -333,7 +333,7 @@ class QueryServiceIntegrationSpec extends FunctionalSpecBase {
         then: 'the correct dataspace was queried'
             assert result.dataspace.toSet() == [FUNCTIONAL_TEST_DATASPACE_1].toSet()
         and: 'correct number of datanodes are returned'
-            assert countDataNodesInTree(result) == expectedNumberOfNodesPerAnchor * NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DATA
+            assert countDataNodesInTree(result) == expectedNumberOfNodesPerAnchor * NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_JSON_DATA
         where: 'the following data is used'
             scenario | fetchDescendantsOption  || expectedNumberOfNodesPerAnchor
             'no'     | OMIT_DESCENDANTS        || 1
index c0d86bc..9638733 100644 (file)
@@ -1,6 +1,7 @@
 /*
  *  ============LICENSE_START=======================================================
  *  Copyright (C) 2023-2024 Nordix Foundation
+ *  Modifications Copyright (C) 2025 TechMahindra Ltd.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the 'License');
  *  you may not use this file except in compliance with the License.
@@ -23,6 +24,7 @@ package org.onap.cps.integration.performance.base
 import org.onap.cps.integration.ResourceMeter
 import org.onap.cps.rest.utils.MultipartFileUtil
 import org.onap.cps.api.parameters.FetchDescendantsOption
+import org.onap.cps.utils.ContentType
 import org.springframework.web.multipart.MultipartFile
 
 class CpsPerfTestBase extends PerfTestBase {
@@ -63,7 +65,7 @@ class CpsPerfTestBase extends PerfTestBase {
     def addOpenRoadData() {
         def data = generateOpenRoadData(OPENROADM_DEVICES_PER_ANCHOR)
         resourceMeter.start()
-        addAnchorsWithData(OPENROADM_ANCHORS, CPS_PERFORMANCE_TEST_DATASPACE, LARGE_SCHEMA_SET, 'openroadm', data)
+        addAnchorsWithData(OPENROADM_ANCHORS, CPS_PERFORMANCE_TEST_DATASPACE, LARGE_SCHEMA_SET, 'openroadm', data, ContentType.JSON)
         resourceMeter.stop()
         def durationInSeconds = resourceMeter.getTotalTimeInSeconds()
         recordAndAssertResourceUsage('Creating openroadm anchors with large data tree', 100, durationInSeconds, 600, resourceMeter.getTotalMemoryUsageInMB())
index 17e1eb6..c68806b 100644 (file)
@@ -1,6 +1,7 @@
 /*
  *  ============LICENSE_START=======================================================
  *  Copyright (C) 2023-2024 Nordix Foundation
+ *  Modifications Copyright (C) 2025 TechMahindra Ltd.
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the 'License');
  *  you may not use this file except in compliance with the License.
@@ -21,7 +22,7 @@
 package org.onap.cps.integration.performance.cps
 
 import org.onap.cps.api.exceptions.DataNodeNotFoundException
-
+import org.onap.cps.utils.ContentType
 import java.time.OffsetDateTime
 import org.onap.cps.api.CpsDataService
 import org.onap.cps.integration.performance.base.CpsPerfTestBase
@@ -36,7 +37,7 @@ class DeletePerfTest extends CpsPerfTestBase {
         when: 'multiple anchors with a node with a large number of descendants is created'
             resourceMeter.start()
             def data = generateOpenRoadData(300)
-            addAnchorsWithData(10, CPS_PERFORMANCE_TEST_DATASPACE, LARGE_SCHEMA_SET, 'delete', data)
+            addAnchorsWithData(10, CPS_PERFORMANCE_TEST_DATASPACE, LARGE_SCHEMA_SET, 'delete', data, ContentType.JSON)
             resourceMeter.stop()
             def setupDurationInSeconds = resourceMeter.getTotalTimeInSeconds()
         then: 'setup duration is within expected time and memory used is within limit'
diff --git a/integration-test/src/test/resources/data/bookstore/bookstoreData.xml b/integration-test/src/test/resources/data/bookstore/bookstoreData.xml
new file mode 100644 (file)
index 0000000..b273355
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<bookstore xmlns="org:onap:cps:sample">
+    <categories>
+        <code>1</code>
+        <name>SciFi</name>
+        <books>
+            <title>2001: A Space Odyssey</title>
+            <lang>en</lang>
+            <authors>Iain M. Banks</authors>
+            <editions>1994</editions>
+            <price>895</price>
+        </books>
+    </categories>
+</bookstore>
\ No newline at end of file