[ONOS-4547, ONOS-4566, ONOS-4575, ONOS-4582, ONOS-4581, ONOS-4600,
ONOS-4598, ONOS-4607, ONOS-4610, ONOS-4611] Prefix addition from config
 and defect fixes.

Change-Id: Ieaab5d3e0fe9a1bfa24a2527eeec5435cf0a1b85
diff --git a/src/test/resources/LengthStatementWithSpace.yang b/src/test/resources/LengthStatementWithSpace.yang
new file mode 100644
index 0000000..e8612d1
--- /dev/null
+++ b/src/test/resources/LengthStatementWithSpace.yang
@@ -0,0 +1,10 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+    leaf invalid-interval {
+        type string {
+            length "                                               0                                                                                      ..                                                                                                                                                                      100                                                                                         ";
+         }
+    }
+}
diff --git a/src/test/resources/PositionImplicitAndExplicit.yang b/src/test/resources/PositionImplicitAndExplicit.yang
index 5be4cbb..bef9712 100644
--- a/src/test/resources/PositionImplicitAndExplicit.yang
+++ b/src/test/resources/PositionImplicitAndExplicit.yang
@@ -2,14 +2,14 @@
     yang-version 1;
     namespace http://huawei.com;
     prefix Ant;
-     leaf mybits {
-         type bits {
-             bit disable-nagle;
-             bit auto-sense-speed {
-                 position 1;
-             }
-             bit Ten-Mb-only;
-             }
-         }
+    leaf mybits {
+        type bits {
+            bit disable-nagle;
+            bit auto-sense-speed {
+                position 1;
+            }
+            bit Ten-Mb-only;
+        }
     }
 }
+
diff --git a/src/test/resources/PositionStatement.yang b/src/test/resources/PositionStatement.yang
index 76c204d..afa0a4c 100644
--- a/src/test/resources/PositionStatement.yang
+++ b/src/test/resources/PositionStatement.yang
@@ -2,17 +2,17 @@
     yang-version 1;
     namespace http://huawei.com;
     prefix Ant;
-     leaf mybits {
-         type bits {
-             bit disable-nagle {
-                 position 0;
-             }
-             bit auto-sense-speed {
-                 position 1;
-             }
-             bit Ten-Mb-only {
-                 position 2;
-             }
-         }
+    leaf mybits {
+        type bits {
+            bit disable-nagle {
+                position 0;
+            }
+            bit auto-sense-speed {
+                position 1;
+            }
+            bit Ten-Mb-only {
+                position 2;
+            }
+        }
     }
 }
diff --git a/src/test/resources/ProcessFileWithExtraBrace.yang b/src/test/resources/ProcessFileWithExtraBrace.yang
new file mode 100644
index 0000000..ca3f0d0
--- /dev/null
+++ b/src/test/resources/ProcessFileWithExtraBrace.yang
@@ -0,0 +1,15 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+        container food {
+            choice snack {
+                list sports-arena {
+                }
+            }
+        }
+    }
+}
+}
+}
+}
diff --git a/src/test/resources/ProcessFileWithExtraBraceInBetween.yang b/src/test/resources/ProcessFileWithExtraBraceInBetween.yang
new file mode 100644
index 0000000..580d270
--- /dev/null
+++ b/src/test/resources/ProcessFileWithExtraBraceInBetween.yang
@@ -0,0 +1,35 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+    import ietf-yang-types {
+        prefix "P";
+    }
+    grouping Percentage {
+        leaf hello{
+            type string;
+        }
+        leaf invalid1{
+            type string;
+        }
+        }
+        leaf invalid2{
+            type string;
+        }
+    }
+    container ospf {
+        list valid {
+            key "invalid";
+            leaf invalid{
+                type string;
+            }
+            uses Ant:FirstClass;
+            grouping FirstClass {
+                uses P:PassingClass;
+            }
+        }
+        grouping PassingClass {
+            uses Ant:Percentage;
+        }
+    }
+}
diff --git a/src/test/resources/ProcessFileWithExtraLeaf.yang b/src/test/resources/ProcessFileWithExtraLeaf.yang
new file mode 100644
index 0000000..5624b7a
--- /dev/null
+++ b/src/test/resources/ProcessFileWithExtraLeaf.yang
@@ -0,0 +1,13 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+    container food {
+        choice snack {
+            list sports-arena {
+            }
+        }
+    }
+}
+leaf invalid {
+
diff --git a/src/test/resources/RangeStatementWithSpace.yang b/src/test/resources/RangeStatementWithSpace.yang
new file mode 100644
index 0000000..a41d68a
--- /dev/null
+++ b/src/test/resources/RangeStatementWithSpace.yang
@@ -0,0 +1,11 @@
+module Test {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Ant;
+    leaf invalid-interval {
+        type int32 {
+            range "                          1                        ..                                        4 |                        10               ..                                          20                  ";
+         }
+    }
+}
+
diff --git a/src/test/resources/ShortCaseListenerWithContainer.yang b/src/test/resources/ShortCaseListenerWithContainer.yang
index 166eeb0..3322a66 100644
--- a/src/test/resources/ShortCaseListenerWithContainer.yang
+++ b/src/test/resources/ShortCaseListenerWithContainer.yang
@@ -2,12 +2,11 @@
     yang-version 1;
     namespace http://huawei.com;
     prefix Ant;
-        container food {
-            choice snack {
-                container sports-arena {
-                    leaf pretzel {
-                        type empty;
-                    }
+    container food {
+        choice snack {
+            container sports-arena {
+                leaf pretzel {
+                    type empty;
                 }
             }
         }
diff --git a/src/test/resources/ShortCaseListenerWithList.yang b/src/test/resources/ShortCaseListenerWithList.yang
index eb03fca..6eeec79 100644
--- a/src/test/resources/ShortCaseListenerWithList.yang
+++ b/src/test/resources/ShortCaseListenerWithList.yang
@@ -2,15 +2,15 @@
     yang-version 1;
     namespace http://huawei.com;
     prefix Ant;
-        container food {
-            choice snack {
-                list sports-arena {
-                    key "pretzel";
-                    leaf pretzel {
-                        type int32;
-                    }
+    container food {
+        choice snack {
+            list sports-arena {
+                key "pretzel";
+                leaf pretzel {
+                    type int32;
                 }
             }
         }
     }
 }
+