[ONOS-4616] YANG grouping linker issues fixed.

Change-Id: I741aa9ad1008c02c9a9f90cc117cd43729132129
diff --git a/utils/yangutils/src/test/java/org/onosproject/yangutils/parser/parseutils/ListenerErrorMessageConstructionTest.java b/utils/yangutils/src/test/java/org/onosproject/yangutils/parser/parseutils/ListenerErrorMessageConstructionTest.java
deleted file mode 100644
index d10e009..0000000
--- a/utils/yangutils/src/test/java/org/onosproject/yangutils/parser/parseutils/ListenerErrorMessageConstructionTest.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright 2016-present Open Networking Laboratory
- *
- * 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.
- */
-
-package org.onosproject.yangutils.parser.parseutils;
-
-import org.junit.Test;
-
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-import static org.onosproject.yangutils.utils.YangConstructType.CONTACT_DATA;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
-
-/**
- * Test case for testing listener error message construction util.
- */
-public class ListenerErrorMessageConstructionTest {
-
-    /**
-     * Checks for error message construction with parsable data type name.
-     */
-    @Test
-    public void checkErrorMsgConstructionWithName() {
-
-        // Create an test error message
-        String testErrorMessage = constructListenerErrorMessage(INVALID_HOLDER, CONTACT_DATA, "Test Instance", ENTRY);
-
-        // Check message.
-        assertThat(testErrorMessage, is("Internal parser error detected: Invalid holder for contact "
-                + "\"Test Instance\" before processing."));
-    }
-
-    /**
-     * Checks for error message construction without parsable data type name.
-     */
-    @Test
-    public void checkErrorMsgConstructionWithoutName() {
-
-        // Create an test error message
-        String testErrorMessage = constructListenerErrorMessage(INVALID_HOLDER, CONTACT_DATA, "Test Instance", ENTRY);
-
-        // Check message.
-        assertThat(testErrorMessage,
-                   is("Internal parser error detected: Invalid holder for contact \"Test Instance\""
-                           + " before processing."));
-    }
-
-    /**
-     * Checks for extended error message construction with parsable data type
-     * name.
-     */
-    @Test
-    public void checkExtendedErrorMsgConstructionWithName() {
-
-        // Create an test error message
-        String testErrorMessage = constructExtendedListenerErrorMessage(INVALID_HOLDER, CONTACT_DATA,
-                                                                        "Test Instance", ENTRY,
-                                                                        "Extended Information");
-
-        // Check message.
-        assertThat(testErrorMessage,
-                   is("Internal parser error detected: Invalid holder for contact \"Test Instance\""
-                           + " before processing.\n" + "Error Information: Extended Information"));
-    }
-
-    /**
-     * Checks for extended error message construction without parsable data type
-     * name.
-     */
-    @Test
-    public void checkExtendedErrorMsgConstructionWithoutName() {
-
-        // Create an test error message
-        String testErrorMessage = constructExtendedListenerErrorMessage(INVALID_HOLDER, CONTACT_DATA, "", ENTRY,
-                                                                        "Extended Information");
-
-        // Check message.
-        assertThat(testErrorMessage, is("Internal parser error detected: Invalid holder for contact"
-                + " before processing.\n" + "Error Information: Extended Information"));
-    }
-}
diff --git a/utils/yangutils/src/test/java/org/onosproject/yangutils/parser/parseutils/ListenerValidationTest.java b/utils/yangutils/src/test/java/org/onosproject/yangutils/parser/parseutils/ListenerValidationTest.java
deleted file mode 100644
index f4e284e..0000000
--- a/utils/yangutils/src/test/java/org/onosproject/yangutils/parser/parseutils/ListenerValidationTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2016-present Open Networking Laboratory
- *
- * 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.
- */
-
-package org.onosproject.yangutils.parser.parseutils;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.onosproject.yangutils.datamodel.YangRevision;
-import org.onosproject.yangutils.parser.exceptions.ParserException;
-import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-
-import static org.onosproject.yangutils.utils.YangConstructType.YANGBASE_DATA;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsEmpty;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
-
-/**
- * Test case for testing listener validation util.
- */
-public class ListenerValidationTest {
-
-    @Rule
-    public ExpectedException thrown = ExpectedException.none();
-
-    /**
-     * Checks for exception in case parsable stack is empty while validating for
-     * not empty scenario.
-     */
-    @Test
-    public void validateStackIsNotEmptyForEmptyStack() {
-
-        String expectedError = constructListenerErrorMessage(MISSING_HOLDER, YANGBASE_DATA, "", EXIT);
-
-        // Get the exception occurred during parsing.
-        thrown.expect(ParserException.class);
-        thrown.expectMessage(expectedError);
-
-        // Create test walker and assign test error to it.
-        TreeWalkListener testWalker = new TreeWalkListener();
-
-        checkStackIsNotEmpty(testWalker, MISSING_HOLDER, YANGBASE_DATA, "", EXIT);
-    }
-
-    /**
-     * Checks if there is no exception in case parsable stack is not empty while
-     * validating for not empty scenario.
-     */
-    @Test
-    public void validateStackIsNotEmptyForNonEmptyStack() {
-
-        // Create test walker and assign test error to it.
-        TreeWalkListener testWalker = new TreeWalkListener();
-
-        // Create a temporary node of parsable.
-        YangRevision tmpNode = new YangRevision();
-        testWalker.getParsedDataStack().push(tmpNode);
-
-        checkStackIsNotEmpty(testWalker, MISSING_HOLDER, YANGBASE_DATA, "", EXIT);
-    }
-
-    /**
-     * Checks for exception in case parsable stack is not empty while validating
-     * for empty scenario.
-     */
-    @Test
-    public void validateStackIsEmptyForNonEmptyStack() {
-
-        String expectedError = constructListenerErrorMessage(MISSING_HOLDER, YANGBASE_DATA, "", EXIT);
-
-        // Get the exception occurred during parsing.
-        thrown.expect(ParserException.class);
-        thrown.expectMessage(expectedError);
-
-        // Create test walker and assign test error to it.
-        TreeWalkListener testWalker = new TreeWalkListener();
-
-        // Create a temporary node of parsable.
-        YangRevision tmpNode = new YangRevision();
-        testWalker.getParsedDataStack().push(tmpNode);
-
-        checkStackIsEmpty(testWalker, MISSING_HOLDER, YANGBASE_DATA, "", EXIT);
-    }
-
-    /**
-     * Checks if there is no exception in case parsable stack is empty while
-     * validating for empty scenario.
-     */
-    @Test
-    public void validateStackIsEmptyForEmptyStack() {
-
-        // Create test walker and assign test error to it.
-        TreeWalkListener testWalker = new TreeWalkListener();
-
-        checkStackIsEmpty(testWalker, MISSING_HOLDER, YANGBASE_DATA, "", EXIT);
-    }
-}
diff --git a/utils/yangutils/src/test/java/org/onosproject/yangutils/parser/parseutils/ParseTreeErrorListenerTest.java b/utils/yangutils/src/test/java/org/onosproject/yangutils/parser/parseutils/ParseTreeErrorListenerTest.java
deleted file mode 100644
index dd09247..0000000
--- a/utils/yangutils/src/test/java/org/onosproject/yangutils/parser/parseutils/ParseTreeErrorListenerTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2016-present Open Networking Laboratory
- *
- * 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.
- */
-
-package org.onosproject.yangutils.parser.parseutils;
-
-import org.antlr.v4.runtime.ANTLRFileStream;
-import org.antlr.v4.runtime.ANTLRInputStream;
-import org.antlr.v4.runtime.CommonTokenStream;
-import org.antlr.v4.runtime.tree.ParseTree;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangLexer;
-import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
-import org.onosproject.yangutils.parser.exceptions.ParserException;
-import org.onosproject.yangutils.parser.impl.CustomExceptionMatcher;
-import org.onosproject.yangutils.parser.impl.YangUtilsParserManager;
-import org.onosproject.yangutils.parser.impl.parserutils.ParseTreeErrorListener;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Test case for testing parse tree error listener.
- */
-public class ParseTreeErrorListenerTest {
-
-    YangUtilsParserManager manager = new YangUtilsParserManager();
-    File file;
-    BufferedWriter out;
-
-    @Rule
-    public ExpectedException thrown = ExpectedException.none();
-
-    /**
-     * Checks that no exception is generated for YANG file with valid syntax.
-     */
-    @Test
-    public void checkValidYangFileForNoSyntaxError() throws IOException {
-
-        ANTLRInputStream input = new ANTLRFileStream("src/test/resources/YangFileWithoutSyntaxError.yang");
-
-        // Create a lexer that feeds off of input char stream.
-        GeneratedYangLexer lexer = new GeneratedYangLexer(input);
-        // Create a buffer of tokens pulled from the lexer.
-        CommonTokenStream tokens = new CommonTokenStream(lexer);
-        // Create a parser that feeds off the tokens buffer.
-        GeneratedYangParser parser = new GeneratedYangParser(tokens);
-        // Remove console error listener.
-        parser.removeErrorListeners();
-        // Create instance of customized error listener.
-        ParseTreeErrorListener parseTreeErrorListener = new ParseTreeErrorListener();
-        // Add customized error listener to catch errors during parsing.
-        parser.addErrorListener(parseTreeErrorListener);
-        // Begin parsing YANG file and generate parse tree.
-        ParseTree tree = parser.yangfile();
-    }
-
-    /**
-     * Checks that exception is generated for YANG file with invalid syntax.
-     */
-    @Test
-    public void checkInvalidYangFileForSyntaxError() throws IOException {
-
-        // Get the exception occurred during parsing.
-        thrown.expect(ParserException.class);
-        thrown.expect(CustomExceptionMatcher.errorLocation(3, 0));
-        thrown.expectMessage("no viable alternative at input 'yang-version 1\\nnamespace'");
-
-        ANTLRInputStream input = new ANTLRFileStream("src/test/resources/YangFileWithSyntaxError.yang");
-
-        // Create a lexer that feeds off of input char stream.
-        GeneratedYangLexer lexer = new GeneratedYangLexer(input);
-        // Create a buffer of tokens pulled from the lexer.
-        CommonTokenStream tokens = new CommonTokenStream(lexer);
-        // Create a parser that feeds off the tokens buffer.
-        GeneratedYangParser parser = new GeneratedYangParser(tokens);
-        // Remove console error listener.
-        parser.removeErrorListeners();
-        // Create instance of customized error listener.
-        ParseTreeErrorListener parseTreeErrorListener = new ParseTreeErrorListener();
-        // Add customized error listener to catch errors during parsing.
-        parser.addErrorListener(parseTreeErrorListener);
-        // Begin parsing YANG file and generate parse tree.
-        ParseTree tree = parser.yangfile();
-    }
-}
\ No newline at end of file
diff --git a/utils/yangutils/src/test/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataTypeTest.java b/utils/yangutils/src/test/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataTypeTest.java
index 85aac96..f2ca36e 100644
--- a/utils/yangutils/src/test/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataTypeTest.java
+++ b/utils/yangutils/src/test/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataTypeTest.java
@@ -125,16 +125,16 @@
      */
     @Test
     public void testgetJavaPkgInfo() {
-        test = getJavaImportPackage(getStubYangType(TYPE1), false, CLASS_INFO1, pluginConfig);
+        test = getJavaImportPackage(getStubYangType(TYPE1), false, pluginConfig);
         assertThat(true, is(test.equals(JAVA_LANG)));
 
-        test = getJavaImportPackage(getStubYangType(TYPE2), true, CLASS_INFO5, pluginConfig);
+        test = getJavaImportPackage(getStubYangType(TYPE2), true, pluginConfig);
         assertThat(true, is(test.equals(JAVA_LANG)));
 
-        test = getJavaImportPackage(getStubYangType(TYPE3), false, CLASS_INFO3, pluginConfig);
+        test = getJavaImportPackage(getStubYangType(TYPE3), false, pluginConfig);
         assertThat(null, is(test));
 
-        test = getJavaImportPackage(getStubYangType(TYPE4), false, CLASS_INFO4, pluginConfig);
+        test = getJavaImportPackage(getStubYangType(TYPE4), false, pluginConfig);
         assertThat(null, is(test));
     }
 
@@ -145,7 +145,7 @@
      */
     @Test
     public void testForTypeDef() throws DataModelException {
-        test = getJavaImportPackage(getStubExtendedInfo(getStubYangType(TYPE_DEF)), false, TYPE_DEF_PKG, pluginConfig);
+        test = getJavaImportPackage(getStubExtendedInfo(getStubYangType(TYPE_DEF)), false, pluginConfig);
         assertThat(true, is(test.equals(TYPE_DEF_PKG)));
     }