+ def 'Parse cps path to form the Normalized cps path containing #scenario.'() {
+ when: 'the given cps path is parsed'
+ def result = CpsPathUtil.getCpsPathQuery(cpsPath)
+ then: 'the query has the right normalized xpath type'
+ assert result.normalizedXpath == expectedNormalizedXPath
+ where: 'the following data is used'
+ scenario | cpsPath || expectedNormalizedXPath
+ 'yang container' | '/cps-path' || '/cps-path'
+ 'descendant anywhere' | '//cps-path' || '//cps-path'
+ 'descendant with leaf condition' | '//cps-path[@key=1]' || "//cps-path[@key='1']"
+ 'descendant with leaf value and ancestor' | '//cps-path[@key=1]/ancestor:parent[@key=1]' || "//cps-path[@key='1']/ancestor:parent[@key='1']"
+ 'parent & child' | '/parent/child' || '/parent/child'
+ 'parent leaf of type Integer & child' | '/parent/child[@code=1]/child2' || "/parent/child[@code='1']/child2"
+ 'parent leaf with double quotes' | '/parent/child[@code="1"]/child2' || "/parent/child[@code='1']/child2"
+ 'parent leaf with double quotes inside single quotes' | '/parent/child[@code=\'"1"\']/child2' || "/parent/child[@code='\"1\"']/child2"
+ 'parent leaf with single quotes inside double quotes' | '/parent/child[@code="\'1\'"]/child2' || "/parent/child[@code='\\\'1\\\'']/child2"
+ 'leaf with single quotes inside double quotes' | '/parent/child[@code="\'1\'"]' || "/parent/child[@code='\\\'1\\\'']"
+ 'leaf with more than one attribute' | '/parent/child[@key1=1 and @key2="abc"]' || "/parent/child[@key1='1' and @key2='abc']"
+ 'parent & child with more than one attribute' | '/parent/child[@key1=1 and @key2="abc"]/child2' || "/parent/child[@key1='1' and @key2='abc']/child2"
+ }
+
+ def 'Parse xpath to form the Normalized xpath containing #scenario.'() {
+ when: 'the given xpath is parsed'
+ def result = CpsPathUtil.getNormalizedXpath(xPath)
+ then: 'the query has the right normalized xpath type'
+ assert result == expectedNormalizedXPath
+ where: 'the following data is used'
+ scenario | xPath || expectedNormalizedXPath
+ 'yang container' | '/xpath' || '/xpath'
+ 'descendant anywhere' | '//xpath' || '//xpath'
+ }
+