diff --git a/cps-ri/src/main/java/org/onap/cps/spi/impl/DataPersistenceServiceImpl.java b/cps-ri/src/main/java/org/onap/cps/spi/impl/DataPersistenceServiceImpl.java
index 9ed1112..51790f3 100755
--- a/cps-ri/src/main/java/org/onap/cps/spi/impl/DataPersistenceServiceImpl.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/impl/DataPersistenceServiceImpl.java
@@ -25,7 +25,6 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-
 @Component
 public class DataPersistenceServiceImpl implements DataPersistenceService {
 
@@ -63,7 +62,8 @@
      * @param jsonStructureId the JSON object identifier.
      */
     @Override
-    public void deleteJsonById(int jsonStructureId) {
+    public void deleteJsonById(final int jsonStructureId) {
         dataRepository.deleteById(jsonStructureId);
     }
+
 }
diff --git a/cps-service/src/main/java/org/onap/cps/api/impl/Fragment.java b/cps-service/src/main/java/org/onap/cps/api/impl/Fragment.java
new file mode 100644
index 0000000..252b09e
--- /dev/null
+++ b/cps-service/src/main/java/org/onap/cps/api/impl/Fragment.java
@@ -0,0 +1,158 @@
+/*
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2020 Nordix Foundation
+ *  ================================================================================
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ *  SPDX-License-Identifier: Apache-2.0
+ *  ============LICENSE_END=========================================================
+ */
+
+package org.onap.cps.api.impl;
+
+import com.google.common.collect.ImmutableList;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import lombok.Getter;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.Module;
+
+/**
+ * Class to store a Yang Fragment (container or list element).
+ */
+public class Fragment {
+
+    @Getter
+    private String xpath;
+
+    @Getter
+    private final Map<String, Object> attributes = new HashMap<>();
+
+    @Getter
+    private final Module module;
+
+    @Getter
+    private final Fragment parentFragment;
+
+    @Getter
+    private final Set<Fragment> childFragments = new HashSet<>(0);
+
+    private final QName[] qnames;
+
+    private Optional<Set<String>> optionalLeafListNames = Optional.empty();
+
+    /**
+     * Create a root Fragment.
+     *
+     * @param module the Yang module that encompasses this fragment
+     * @param qnames the list of qualified names that points the schema node for this fragment
+     */
+    public static Fragment createRootFragment(final Module module, final QName... qnames) {
+        return new Fragment(null, module, qnames);
+    }
+
+    /**
+     * Create a Child Fragment under a given Parent Fragment.
+     *
+     * @param parentFragment the parent (can be null for 'root' objects)
+     * @param module         the Yang module that encompasses this fragment
+     * @param qnames         the list of qualified names that points the schema node for this fragment
+     */
+    private Fragment(final Fragment parentFragment, final Module module, final QName... qnames) {
+        this.parentFragment = parentFragment;
+        this.module = module;
+        this.qnames = qnames;
+    }
+
+    /**
+     * Create a Child Fragment where the current Fragment is the parent.
+     *
+     * @param qnameChild The Qualified name for the child (relative to the parent)
+     * @return the child fragment
+     */
+    public Fragment createChildFragment(final QName qnameChild) {
+        final QName[] qnamesForChild = Arrays.copyOf(qnames, qnames.length + 1);
+        qnamesForChild[qnamesForChild.length - 1] = qnameChild;
+        final Fragment childFragment = new Fragment(this, module, qnamesForChild);
+        childFragments.add(childFragment);
+        return childFragment;
+    }
+
+    /**
+     * Define a leaf list by providing its name.
+     * The list is not instantiated until the first value is provided
+     *
+     * @param name the name of the leaf list
+     */
+    public void addLeafListName(final String name) {
+        if (optionalLeafListNames.isEmpty()) {
+            optionalLeafListNames = Optional.of(new HashSet<>());
+        }
+        optionalLeafListNames.get().add(name);
+    }
+
+    /**
+     * Add a leaf or leaf list value.
+     * For Leaf lists it is essential to first define the attribute is a leaf list by using addLeafListName method
+     *
+     * @param name  the name of the leaf (or leaf list)
+     * @param value the value of the leaf (or element of leaf list)
+     */
+    public void addLeafValue(final String name, final Object value) {
+        if (optionalLeafListNames.isPresent() && optionalLeafListNames.get().contains(name)) {
+            addLeafListValue(name, value);
+        } else {
+            attributes.put(name, value);
+        }
+    }
+
+    private void addLeafListValue(final String name, final Object value) {
+        if (attributes.containsKey(name)) {
+            final ImmutableList<Object> oldList = (ImmutableList<Object>) attributes.get(name);
+            final List<Object> newList = new ArrayList<>(oldList);
+            newList.add(value);
+            attributes.put(name, ImmutableList.copyOf(newList));
+        } else {
+            attributes.put(name, ImmutableList.of(value));
+        }
+    }
+
+    /**
+     * Get the SchemaNodeIdentifier for this fragment.
+     *
+     * @return the SchemaNodeIdentifier
+     */
+    public String getSchemaNodeIdentifier() {
+        final StringBuilder stringBuilder = new StringBuilder();
+        for (final QName qname : qnames) {
+            stringBuilder.append(qname.getLocalName());
+            stringBuilder.append('/');
+        }
+        return stringBuilder.toString();
+    }
+
+    /**
+     * Get the Optional SchemaNode (model) for this data fragment.
+     *
+     * @return the Optional SchemaNode
+     */
+    public Optional<DataSchemaNode> getSchemaNode() {
+        return module.findDataTreeChild(qnames);
+    }
+}
diff --git a/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java b/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java
index e9757ec..0f05d7d 100644
--- a/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java
+++ b/cps-service/src/main/java/org/onap/cps/utils/YangUtils.java
@@ -23,15 +23,26 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.StringReader;
+import java.util.Collection;
 import java.util.Iterator;
 import java.util.ServiceLoader;
+import java.util.logging.Logger;
+import org.onap.cps.api.impl.Fragment;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode;
+import org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode;
+import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
+import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.yangtools.yang.data.api.schema.ValueNode;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
 import org.opendaylight.yangtools.yang.data.codec.gson.JSONCodecFactory;
 import org.opendaylight.yangtools.yang.data.codec.gson.JSONCodecFactorySupplier;
 import org.opendaylight.yangtools.yang.data.codec.gson.JsonParserStream;
 import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNormalizedNodeStreamWriter;
 import org.opendaylight.yangtools.yang.data.impl.schema.NormalizedNodeResult;
+import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.parser.api.YangParser;
 import org.opendaylight.yangtools.yang.model.parser.api.YangParserException;
@@ -43,6 +54,8 @@
 
     private static final YangParserFactory PARSER_FACTORY;
 
+    private static final Logger LOGGER = Logger.getLogger(YangUtils.class.getName());
+
     private YangUtils() {
         throw new IllegalStateException("Utility class");
     }
@@ -57,14 +70,14 @@
 
     /**
      * Parse a file containing yang modules.
-     * @param yangModelFile  a file containing one or more yang modules
-     *                   (please note the file has to have a .yang extension if not an exception will be thrown)
+     *
+     * @param yangModelFile a file containing one or more yang modules. The file has to have a .yang extension.
      * @return a SchemaContext representing the yang model
-     * @throws IOException when the system as an IO issue
+     * @throws IOException         when the system as an IO issue
      * @throws YangParserException when the file does not contain a valid yang structure
      */
     public static SchemaContext parseYangModelFile(final File yangModelFile) throws IOException, YangParserException {
-        YangTextSchemaSource yangTextSchemaSource = YangTextSchemaSource.forFile(yangModelFile);
+        final YangTextSchemaSource yangTextSchemaSource = YangTextSchemaSource.forFile(yangModelFile);
         final YangParser yangParser = PARSER_FACTORY
                 .createParser(StatementParserMode.DEFAULT_MODE);
         yangParser.addSource(yangTextSchemaSource);
@@ -73,18 +86,19 @@
 
     /**
      * Parse a file containing json data for a certain model (schemaContext).
-     * @param jsonData a string containing json data for the given model
+     *
+     * @param jsonData      a string containing json data for the given model
      * @param schemaContext the SchemaContext for the given data
      * @return the NormalizedNode representing the json data
      */
     public static NormalizedNode<?, ?> parseJsonData(final String jsonData, final SchemaContext schemaContext)
             throws IOException {
-        JSONCodecFactory jsonCodecFactory = JSONCodecFactorySupplier.DRAFT_LHOTKA_NETMOD_YANG_JSON_02
+        final JSONCodecFactory jsonCodecFactory = JSONCodecFactorySupplier.DRAFT_LHOTKA_NETMOD_YANG_JSON_02
                 .getShared(schemaContext);
         final NormalizedNodeResult normalizedNodeResult = new NormalizedNodeResult();
         final NormalizedNodeStreamWriter normalizedNodeStreamWriter = ImmutableNormalizedNodeStreamWriter
                 .from(normalizedNodeResult);
-        try (JsonParserStream jsonParserStream = JsonParserStream
+        try (final JsonParserStream jsonParserStream = JsonParserStream
                 .create(normalizedNodeStreamWriter, jsonCodecFactory)) {
             final JsonReader jsonReader = new JsonReader(new StringReader(jsonData));
             jsonParserStream.parse(jsonReader);
@@ -92,8 +106,69 @@
         return normalizedNodeResult.getResult();
     }
 
-    public static void chopNormalizedNode(NormalizedNode<?, ?> tree) {
-        //TODO Toine Siebelink, add code from proto-type (other user story)
+    /**
+     * Break a Normalized Node tree into fragments that can be stored by the persistence service.
+     *
+     * @param tree   the normalized node tree
+     * @param module the module applicable for the data in the normalized node
+     * @return the 'root' Fragment for the tree contain all relevant children etc.
+     */
+    public static Fragment fragmentNormalizedNode(
+            final NormalizedNode<? extends YangInstanceIdentifier.PathArgument, ?> tree,
+            final Module module) {
+        final QName nodeType = tree.getNodeType();
+        final Fragment rootFragment = Fragment.createRootFragment(module, nodeType);
+        fragmentNormalizedNode(rootFragment, tree);
+        return rootFragment;
     }
 
+    private static void fragmentNormalizedNode(final Fragment currentFragment,
+                                               final NormalizedNode normalizedNode) {
+        if (normalizedNode instanceof DataContainerNode) {
+            inspectContainer(currentFragment, (DataContainerNode) normalizedNode);
+        } else if (normalizedNode instanceof MapNode) {
+            inspectKeyedList(currentFragment, (MapNode) normalizedNode);
+        } else if (normalizedNode instanceof ValueNode) {
+            inspectLeaf(currentFragment, (ValueNode) normalizedNode);
+        } else if (normalizedNode instanceof LeafSetNode) {
+            inspectLeafList(currentFragment, (LeafSetNode) normalizedNode);
+        } else {
+            LOGGER.warning("Cannot normalize " + normalizedNode.getClass());
+        }
+    }
+
+    private static void inspectLeaf(final Fragment currentFragment,
+                                    final ValueNode valueNode) {
+        final Object value = valueNode.getValue();
+        currentFragment.addLeafValue(valueNode.getNodeType().getLocalName(), value);
+    }
+
+    private static void inspectLeafList(final Fragment currentFragment,
+                                        final LeafSetNode leafSetNode) {
+        currentFragment.addLeafListName(leafSetNode.getNodeType().getLocalName());
+        for (final NormalizedNode value : (Collection<NormalizedNode>) leafSetNode.getValue()) {
+            fragmentNormalizedNode(currentFragment, value);
+        }
+    }
+
+    private static void inspectContainer(final Fragment currentFragment,
+                                         final DataContainerNode dataContainerNode) {
+        final Collection<NormalizedNode> leaves = (Collection) dataContainerNode.getValue();
+        for (final NormalizedNode leaf : leaves) {
+            fragmentNormalizedNode(currentFragment, leaf);
+        }
+    }
+
+    private static void inspectKeyedList(final Fragment currentFragment,
+                                         final MapNode mapNode) {
+        createNodeForEachListElement(currentFragment, mapNode);
+    }
+
+    private static void createNodeForEachListElement(final Fragment currentFragment, final MapNode mapNode) {
+        final Collection<MapEntryNode> mapEntryNodes = mapNode.getValue();
+        for (final MapEntryNode mapEntryNode : mapEntryNodes) {
+            final Fragment listElementFragment = currentFragment.createChildFragment(mapNode.getNodeType());
+            fragmentNormalizedNode(listElementFragment, mapEntryNode);
+        }
+    }
 }
diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpServiceImplSpec.groovy
index 709378e..2a3d5cb 100755
--- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpServiceImplSpec.groovy
+++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpServiceImplSpec.groovy
@@ -67,7 +67,7 @@
     }
 
     def assertModule(SchemaContext schemaContext){
-        def optionalModule = schemaContext.findModule('bookstore', Revision.of('2020-09-15'))
+        def optionalModule = schemaContext.findModule('stores', Revision.of('2020-09-15'))
         return schemaContext.modules.size() == 1 && optionalModule.isPresent()
     }
 
@@ -167,4 +167,4 @@
         expect: 'anchor name is returned by service'
             objectUnderTest.createAnchor(anchorDetails) == 'dummyAnchorName'
     }
-}
\ No newline at end of file
+}
diff --git a/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy
index 8aabc48..6a463ad 100644
--- a/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy
+++ b/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy
@@ -19,14 +19,16 @@
 
 package org.onap.cps.utils
 
-import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode
+import org.onap.cps.TestUtils
 import org.opendaylight.yangtools.yang.common.QName
 import org.opendaylight.yangtools.yang.common.Revision
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode
 import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException
 import spock.lang.Specification
 import spock.lang.Unroll
 
 class YangUtilsSpec extends Specification{
+
     def 'Parsing a valid Yang Model'() {
         given: 'a yang model (file)'
             def file = new File(ClassLoader.getSystemClassLoader().getResource('bookstore.yang').getFile())
@@ -34,14 +36,14 @@
             def result = YangUtils.parseYangModelFile(file)
         then: 'the result contain 1 module of the correct name and revision'
             result.modules.size() == 1
-            def optionalModule = result.findModule('bookstore', Revision.of('2020-09-15'))
+            def optionalModule = result.findModule('stores', Revision.of('2020-09-15'))
             optionalModule.isPresent()
     }
 
     @Unroll
-    def 'parsing invalid yang file (#description)'() {
+    def 'Parsing invalid yang file (#description).'() {
         given: 'a file with #description'
-            File file = new File(ClassLoader.getSystemClassLoader().getResource(filename).getFile());
+            File file = new File(ClassLoader.getSystemClassLoader().getResource(filename).getFile())
         when: 'the file is parsed'
             YangUtils.parseYangModelFile(file)
         then: 'an exception is thrown'
@@ -52,29 +54,48 @@
             'someOtherFile.txt' | 'no .yang extension' || IllegalArgumentException
     }
 
-    def 'Parsing a valid Json String'() {
+    def 'Parsing a valid Json String.'() {
         given: 'a yang model (file)'
             def jsonData = org.onap.cps.TestUtils.getResourceFileContent('bookstore.json')
         and: 'a model for that data'
             def file = new File(ClassLoader.getSystemClassLoader().getResource('bookstore.yang').getFile())
             def schemaContext = YangUtils.parseYangModelFile(file)
         when: 'the json data is parsed'
-            NormalizedNode<?, ?> result = YangUtils.parseJsonData(jsonData, schemaContext);
+            NormalizedNode<?, ?> result = YangUtils.parseJsonData(jsonData, schemaContext)
         then: 'the result is a normalized node of the correct type'
-            result.nodeType == QName.create('org:onap:ccsdk:sample','2020-09-15','bookstore')
+            result.nodeType == QName.create('org:onap:ccsdk:sample', '2020-09-15', 'bookstore')
     }
 
-    def 'Parsing an invalid Json String'() {
+    @Unroll
+    def 'Parsing invalid data: #description.'() {
         given: 'a yang model (file)'
-            def jsonData = '{incomplete json'
-        and: 'a model'
             def file = new File(ClassLoader.getSystemClassLoader().getResource('bookstore.yang').getFile())
             def schemaContext = YangUtils.parseYangModelFile(file)
-        when: 'the invalid json is parsed'
-            YangUtils.parseJsonData(jsonData, schemaContext);
-        then: ' an exception is thrown'
+        when: 'invalid data is parsed'
+            YangUtils.parseJsonData(invalidJson, schemaContext)
+        then: 'an exception is thrown'
             thrown(IllegalStateException)
+        where: 'the following invalid json is provided'
+            invalidJson                                       | description
+            '{incomplete json'                                | 'incomplete json'
+            '{"test:bookstore": {"address": "Parnell st." }}' | 'json with un-modelled data'
     }
 
+    def 'Breaking a Json Data Object into fragments.'() {
+        given: 'a Yang module'
+            def file = new File(ClassLoader.getSystemClassLoader().getResource('bookstore.yang').getFile())
+            def schemaContext = YangUtils.parseYangModelFile(file)
+            def module = schemaContext.findModule('stores', Revision.of('2020-09-15')).get()
+        and: 'a normalized node for that model'
+            def jsonData = TestUtils.getResourceFileContent('bookstore.json')
+            def normalizedNode = YangUtils.parseJsonData(jsonData, schemaContext)
+        when: 'the json data is fragmented'
+            def result = YangUtils.fragmentNormalizedNode(normalizedNode, module)
+        then: 'the system creates a (root) fragment without a parent and 2 children (categories)'
+            result.parentFragment == null
+            result.childFragments.size() == 2
+        and: 'each child (category) has the root fragment (result) as parent and in turn as 1 child (a list of books)'
+            result.childFragments.each { it.parentFragment == result && it.childFragments.size() == 1 }
+    }
 
 }
diff --git a/cps-service/src/test/resources/bookstore.json b/cps-service/src/test/resources/bookstore.json
index 44d5d42..d1b8d68 100644
--- a/cps-service/src/test/resources/bookstore.json
+++ b/cps-service/src/test/resources/bookstore.json
@@ -1,34 +1,52 @@
 {
    "test:bookstore":{
-      "categories":[
+      "bookstore-name": "Chapters",
+      "categories": [
          {
-            "name":"web",
-            "books":[
+            "code": "01",
+            "name": "SciFi",
+            "books": [
                {
-                  "authors":[
-                     "Toine Siebelink","David Lang"
+                  "authors": [
+                     "Iain M. Banks"
                   ],
-                  "lang":"en",
-                  "price":"123456",
-                  "pub_year":"2020",
-                  "title":"My first book"
+                  "lang": "en",
+                  "price": "895",
+                  "pub_year": "1994",
+                  "title": "Feersum Endjinn"
+               },
+               {
+                  "authors": [
+                     "Ursula K. Le Guin",
+                     "Joe Haldeman",
+                     "Orson Scott Card",
+                     "david Brin",
+                     "Rober Silverberg",
+                     "Dan Simmons",
+                     "Greg Bear"
+                  ],
+                  "lang": "en",
+                  "price": "1099",
+                  "pub_year": "1999",
+                  "title": "Far Horizons"
                }
             ]
          },
          {
-            "name":"art",
-            "books":[
+            "name": "kids",
+            "code": "02",
+            "books": [
                {
-                  "authors":[
-                     "Test"
+                  "authors": [
+                     "Philip Pullman"
                   ],
-                  "lang":"en",
-                  "price":"1234",
-                  "pub_year":"2020",
-                  "title":"My 2nd book"
+                  "lang": "en",
+                  "price": "699",
+                  "pub_year": "1995",
+                  "title": "The Golden Compass"
                }
             ]
          }
       ]
    }
-}
\ No newline at end of file
+}
diff --git a/cps-service/src/test/resources/bookstore.yang b/cps-service/src/test/resources/bookstore.yang
index 01eac5f..2179fb9 100644
--- a/cps-service/src/test/resources/bookstore.yang
+++ b/cps-service/src/test/resources/bookstore.yang
@@ -1,6 +1,5 @@
-module bookstore {
+module stores {
     yang-version 1.1;
-
     namespace "org:onap:ccsdk:sample";
 
     prefix book-store;
@@ -18,9 +17,17 @@
 
     container bookstore {
 
+        leaf bookstore-name {
+            type string;
+        }
+
     list categories {
 
-        key name;
+        key "code";
+
+        leaf code {
+            type string;
+        }
 
         leaf name {
             type string;
