[ONOS-4941][ONOS-4883][ONOS-4979]Grouping and uses interfile linking issue + defect fix

Change-Id: I5e8145f05d3ef570d4ecbbe885c93de172de0ea3
diff --git a/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-network-topology.yang b/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-network-topology.yang
new file mode 100644
index 0000000..499c0f1
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-network-topology.yang
@@ -0,0 +1,37 @@
+module ietf-network-topology {
+    yang-version 1;
+    namespace "ietf-vidya-topology";
+    prefix lnk;
+
+    import ietf-network {
+        prefix nd;
+    }
+
+    revision 2015-12-08 {
+        description
+         "Initial revision.
+          NOTE TO RFC EDITOR: Please replace the following reference
+          to draft-ietf-i2rs-yang-network-topo-02 with
+          RFC number when published (i.e. RFC xxxx).";
+        reference
+          "draft-ietf-i2rs-yang-network-topo-02.";
+    }
+
+    augment "/nd:networks/nd:network" {
+        list link {
+            key "link-id";
+            container source {
+                leaf source-node {
+                    type string;
+                    mandatory true;
+                }
+                leaf source-tp {
+                    type string;
+                }
+            }
+            leaf link-id {
+                type string;
+            }
+        }
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-network.yang b/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-network.yang
new file mode 100644
index 0000000..a78b231
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-network.yang
@@ -0,0 +1,30 @@
+module ietf-network {
+    yang-version 1;
+    namespace "ietf-network";
+    prefix nd;
+
+    revision 2015-12-08 {
+        description
+         "Initial revision.
+          NOTE TO RFC EDITOR: Please replace the following reference
+          to draft-ietf-i2rs-yang-network-topo-02 with
+          RFC number when published (i.e. RFC xxxx).";
+         reference
+          "draft-ietf-i2rs-yang-network-topo-02";
+    }
+
+    container networks {
+        list network {
+            key "network-id";
+            leaf network-id {
+                type string;
+            }
+            list node {
+                key "node-id";
+                leaf node-id {
+                    type string;
+                }
+            }
+        }
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-te-topology.yang b/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-te-topology.yang
new file mode 100644
index 0000000..f92fccc
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-te-topology.yang
@@ -0,0 +1,65 @@
+module ietf-te-topology {
+    yang-version 1;
+    namespace "ietf-te-topology";
+    prefix "tet";
+
+    import ietf-te-types {
+        prefix "te-types";
+    }
+
+    import ietf-network {
+        prefix "nw";
+    }
+
+    import ietf-network-topology {
+        prefix "nt";
+    }
+
+    revision "2016-03-17" {
+        description "Initial revision";
+        reference "TBD";
+    }
+
+    grouping te-link-augment {
+        container te {
+            container config {
+                uses te-link-config;
+            } // config
+        } // te
+    } // te-link-augment
+
+    grouping te-link-config {
+        uses te-link-config-attributes;
+    } // te-link-config
+
+    grouping te-link-config-attributes {
+        container te-link-attributes {
+            container underlay {
+                uses te-link-underlay-attributes;
+            } // underlay
+        } // te-link-attributes
+    } // te-link-config-attributes
+
+    grouping te-link-underlay-attributes {
+        container underlay-primary-path {
+            list path-element {
+                key "path-element-id";
+                description
+                    "A list of path elements describing the service path.";
+                leaf path-element-id {
+                    type uint32;
+                    description "To identify the element in a path.";
+                }
+                uses te-path-element;
+            }
+        } // underlay-primary-path
+    } // te-link-underlay-attributes
+
+    grouping te-path-element {
+        uses te-types:explicit-route-subobject;
+    } // te-path-element
+
+    augment "/nw:networks/nw:network/nt:link" {
+        uses te-link-augment;
+    }
+}
diff --git a/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-te-types.yang b/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-te-types.yang
new file mode 100644
index 0000000..96ce986
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/interFileUsesInsideChildOfGrouping/ietf-te-types.yang
@@ -0,0 +1,19 @@
+module ietf-te-types {
+
+    namespace "ietf-te-types";
+    prefix "te-types";
+
+    revision 2016-03-20 {
+        description "Latest revision of TE generic types";
+        reference "RFC3209";
+    }
+    grouping explicit-route-subobject {
+        choice type {
+            case ipv4-address {
+                leaf v4-address {
+                    type string;
+                }
+            }
+        }
+    }
+}