[ONOS-4711] Removed cyclic dependencies
because of JUNIT testcases

Change-Id: I0402d224cbb0d0d541a1f47333a4e5de5cf240b0
diff --git a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataTypeTest.java b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataTypeTest.java
deleted file mode 100644
index 35cc4bc..0000000
--- a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataTypeTest.java
+++ /dev/null
@@ -1,205 +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.translator.tojava.utils;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-
-import org.junit.Test;
-import org.onosproject.yangutils.datamodel.YangDataTypes;
-import org.onosproject.yangutils.datamodel.YangDerivedInfo;
-import org.onosproject.yangutils.datamodel.YangNode;
-import org.onosproject.yangutils.datamodel.YangType;
-import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
-import org.onosproject.yangutils.translator.tojava.JavaFileInfo;
-import org.onosproject.yangutils.translator.tojava.javamodel.AttributesJavaDataType;
-import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaModule;
-import org.onosproject.yangutils.translator.tojava.javamodel.YangJavaTypeDef;
-import org.onosproject.yangutils.utils.io.impl.YangToJavaNamingConflictUtil;
-
-import static org.hamcrest.core.Is.is;
-import static org.hamcrest.core.IsNot.not;
-import static org.junit.Assert.assertThat;
-import static org.onosproject.yangutils.datamodel.YangDataTypes.BOOLEAN;
-import static org.onosproject.yangutils.datamodel.YangDataTypes.DERIVED;
-import static org.onosproject.yangutils.datamodel.YangDataTypes.INT32;
-import static org.onosproject.yangutils.datamodel.YangDataTypes.STRING;
-import static org.onosproject.yangutils.datamodel.YangDataTypes.UINT8;
-import static org.onosproject.yangutils.translator.tojava.javamodel.AttributesJavaDataType.getJavaDataType;
-import static org.onosproject.yangutils.translator.tojava.javamodel.AttributesJavaDataType.getJavaImportClass;
-import static org.onosproject.yangutils.translator.tojava.javamodel.AttributesJavaDataType.getJavaImportPackage;
-import static org.onosproject.yangutils.utils.UtilConstants.JAVA_LANG;
-
-/**
- * Unit test case for attribute java data type.
- */
-public class AttributesJavaDataTypeTest {
-
-    private static final YangDataTypes TYPE1 = STRING;
-    private static final YangDataTypes TYPE2 = INT32;
-    private static final YangDataTypes TYPE3 = BOOLEAN;
-    private static final YangDataTypes TYPE4 = UINT8;
-    private static final YangDataTypes TYPE_DEF = DERIVED;
-    private static final String CLASS_INFO1 = "String";
-    private static final String CLASS_INFO2 = "int";
-    private static final String CLASS_INFO3 = "boolean";
-    private static final String CLASS_INFO4 = "short";
-    private static final String CLASS_INFO5 = "Integer";
-    private static final String TYPE_DEF_PKG = "target.test";
-    private static String test = "";
-    private static YangToJavaNamingConflictUtil pluginConfig = null;
-
-    /**
-     * Unit test for private constructor.
-     *
-     * @throws SecurityException if any security violation is observed
-     * @throws NoSuchMethodException if when the method is not found
-     * @throws IllegalArgumentException if there is illegal argument found
-     * @throws InstantiationException if instantiation is provoked for the private constructor
-     * @throws IllegalAccessException if instance is provoked or a method is provoked
-     * @throws InvocationTargetException when an exception occurs by the method or constructor
-     */
-    @Test
-    public void callPrivateConstructors()
-            throws SecurityException, NoSuchMethodException, IllegalArgumentException,
-            InstantiationException, IllegalAccessException, InvocationTargetException {
-
-        Class<?>[] classesToConstruct = {AttributesJavaDataType.class };
-        for (Class<?> clazz : classesToConstruct) {
-            Constructor<?> constructor = clazz.getDeclaredConstructor();
-            constructor.setAccessible(true);
-            assertThat(null, not(constructor.newInstance()));
-        }
-    }
-
-    /**
-     * Unit test for java class info method test.
-     */
-    @Test
-    public void testgetJavaClassInfo() {
-        test = getJavaImportClass(getStubYangType(TYPE1), false, pluginConfig);
-        assertThat(true, is(test.equals(CLASS_INFO1)));
-
-        test = getJavaImportClass(getStubYangType(TYPE2), true, pluginConfig);
-        assertThat(true, is(test.equals(CLASS_INFO5)));
-
-        test = getJavaImportClass(getStubYangType(TYPE3), false, pluginConfig);
-        assertThat(null, is(test));
-
-        test = getJavaImportClass(getStubYangType(TYPE4), false, pluginConfig);
-        assertThat(null, is(test));
-    }
-
-    /**
-     * Unit test for java data type method.
-     */
-    @Test
-    public void testgetJavaDataType() {
-        test = getJavaDataType(getStubYangType(TYPE1));
-        assertThat(true, is(test.equals(CLASS_INFO1)));
-
-        test = getJavaDataType(getStubYangType(TYPE2));
-        assertThat(true, is(test.equals(CLASS_INFO2)));
-
-        test = getJavaDataType(getStubYangType(TYPE3));
-        assertThat(true, is(test.equals(CLASS_INFO3)));
-
-        test = getJavaDataType(getStubYangType(TYPE4));
-        assertThat(true, is(test.equals(CLASS_INFO4)));
-    }
-
-    /**
-     * Unit test for java package info method.
-     */
-    @Test
-    public void testgetJavaPkgInfo() {
-        test = getJavaImportPackage(getStubYangType(TYPE1), false, pluginConfig);
-        assertThat(true, is(test.equals(JAVA_LANG)));
-
-        test = getJavaImportPackage(getStubYangType(TYPE2), true, pluginConfig);
-        assertThat(true, is(test.equals(JAVA_LANG)));
-
-        test = getJavaImportPackage(getStubYangType(TYPE3), false, pluginConfig);
-        assertThat(null, is(test));
-
-        test = getJavaImportPackage(getStubYangType(TYPE4), false, pluginConfig);
-        assertThat(null, is(test));
-    }
-
-    /**
-     * Unit test case for typedef.
-     *
-     * @throws DataModelException when fails to do data model operations
-     */
-    @Test
-    public void testForTypeDef() throws DataModelException {
-        test = getJavaImportPackage(getStubExtendedInfo(getStubYangType(TYPE_DEF)), false, pluginConfig);
-        assertThat(true, is(test.equals(TYPE_DEF_PKG)));
-    }
-
-    /**
-     * Returns stub YANG type for test.
-     *
-     * @param dataTypes YANG data types
-     * @return YANG type
-     */
-    private YangType<?> getStubYangType(YangDataTypes dataTypes) {
-        YangType<?> type = new YangType<>();
-        type.setDataType(dataTypes);
-        return type;
-    }
-
-    /**
-     * Returns YANG type with extended info.
-     *
-     * @param type YANG type
-     * @return YANG type with extended info
-     * @throws DataModelException when fails to do data model operations
-     */
-    @SuppressWarnings("unchecked")
-    private YangType<?> getStubExtendedInfo(YangType<?> type) throws DataModelException {
-        YangJavaTypeDef typedef = new YangJavaTypeDef();
-        getStubParent().addChild(typedef);
-        YangDerivedInfo<?> derInfo = new YangDerivedInfo<>();
-        derInfo.setReferredTypeDef(typedef);
-        ((YangType<YangDerivedInfo<?>>) type).setDataTypeExtendedInfo(derInfo);
-        return type;
-    }
-
-    /**
-     * Returns java file info.
-     *
-     * @return java file info
-     */
-    private JavaFileInfo addStubJavaFileInfo() {
-        JavaFileInfo fileInfo = new JavaFileInfo();
-        fileInfo.setJavaName("test");
-        fileInfo.setPackage("target");
-        return fileInfo;
-    }
-
-    /**
-     * Adds stub parent module for typedef.
-     *
-     * @return stub parent module
-     */
-    private YangNode getStubParent() {
-        YangJavaModule parent = new YangJavaModule();
-        parent.setJavaFileInfo(addStubJavaFileInfo());
-        return parent;
-    }
-}
diff --git a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/ChoiceCaseTranslatorTest.java b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/ChoiceCaseTranslatorTest.java
deleted file mode 100644
index 993d38c..0000000
--- a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/ChoiceCaseTranslatorTest.java
+++ /dev/null
@@ -1,54 +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.translator.tojava.utils;
-
-import java.io.IOException;
-
-import org.junit.Test;
-import org.onosproject.yangutils.datamodel.YangNode;
-import org.onosproject.yangutils.parser.exceptions.ParserException;
-import org.onosproject.yangutils.parser.impl.YangUtilsParserManager;
-import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
-
-import static org.onosproject.yangutils.translator.tojava.JavaCodeGeneratorUtil.generateJavaCode;
-import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.deleteDirectory;
-
-/**
- * Unit tests for choice-case translator.
- */
-public final class ChoiceCaseTranslatorTest {
-
-    private final YangUtilsParserManager manager = new YangUtilsParserManager();
-
-    /**
-     * Checks choice-case translation should not result in any exception.
-     */
-    @Test
-    public void processChoiceCaseTranslator() throws IOException, ParserException {
-
-        String userDir = System.getProperty("user.dir");
-        YangNode node = manager.getDataModel("src/test/resources/ChoiceCaseTranslator.yang");
-
-        YangPluginConfig yangPluginConfig = new YangPluginConfig();
-        yangPluginConfig.setCodeGenDir(userDir + "/target/ChoiceCaseTestGenFile/");
-
-        generateJavaCode(node, yangPluginConfig);
-
-        deleteDirectory(userDir + "/target/ChoiceCaseTestGenFile/");
-    }
-    // TODO enhance the test cases, after having a framework of translator test.
-}
diff --git a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/EnumTranslatorTest.java b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/EnumTranslatorTest.java
deleted file mode 100644
index 742d310..0000000
--- a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/EnumTranslatorTest.java
+++ /dev/null
@@ -1,55 +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.translator.tojava.utils;
-
-import java.io.IOException;
-
-import org.junit.Test;
-import org.onosproject.yangutils.datamodel.YangNode;
-import org.onosproject.yangutils.parser.exceptions.ParserException;
-import org.onosproject.yangutils.parser.impl.YangUtilsParserManager;
-import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
-
-import static org.onosproject.yangutils.translator.tojava.JavaCodeGeneratorUtil.generateJavaCode;
-import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.deleteDirectory;
-
-/**
- * Unit test case for enum translator.
- */
-public final class EnumTranslatorTest {
-
-    private final YangUtilsParserManager manager = new YangUtilsParserManager();
-
-    /**
-     * Checks enum translation should not result in any exception.
-     */
-    @Test
-    public void processEnumTranslator()
-            throws IOException, ParserException {
-
-        String userDir = System.getProperty("user.dir");
-        YangNode node = manager.getDataModel("src/test/resources/EnumTranslator.yang");
-
-        YangPluginConfig yangPluginConfig = new YangPluginConfig();
-        yangPluginConfig.setCodeGenDir(userDir + "/target/EnumTestGenFile/");
-
-        generateJavaCode(node, yangPluginConfig);
-
-        deleteDirectory(userDir + "/target/EnumTestGenFile/");
-    }
-    // TODO enhance the test cases, after having a framework of translator test.
-}
diff --git a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntaxTest.java b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntaxTest.java
index b844b27..24f4904 100644
--- a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntaxTest.java
+++ b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntaxTest.java
@@ -16,26 +16,30 @@
 
 package org.onosproject.yangutils.translator.tojava.utils;
 
+import java.io.File;
+import java.io.IOException;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
-
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.onosproject.yangutils.translator.exception.TranslatorException;
 import org.onosproject.yangutils.utils.io.impl.YangToJavaNamingConflictUtil;
 
+import static org.apache.commons.io.FileUtils.deleteDirectory;
 import static org.hamcrest.core.Is.is;
 import static org.hamcrest.core.IsNot.not;
 import static org.junit.Assert.assertThat;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.doesPackageExist;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getRootPackage;
+import static org.onosproject.yangutils.utils.UtilConstants.DEFAULT_BASE_PKG;
+import static org.onosproject.yangutils.utils.UtilConstants.PERIOD;
+import static org.onosproject.yangutils.utils.UtilConstants.SLASH;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCamelCase;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getCapitalCase;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getJavaPackageFromPackagePath;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getPackageDirPathFromJavaJPackage;
-import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getRootPackage;
 import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getSmallCase;
-import static org.onosproject.yangutils.utils.UtilConstants.DEFAULT_BASE_PKG;
-import static org.onosproject.yangutils.utils.UtilConstants.PERIOD;
 
 /**
  * Unit tests for java identifier syntax.
@@ -101,25 +105,30 @@
     private static final String WITH_CAMEL_CASE_WITH_PREFIX = "123addPrefixTry";
     private static final String WITH_CAMEL_CASE_WITH_PREFIX1 = "abc1234567890Ss1123G123Gaa";
     private static YangToJavaNamingConflictUtil conflictResolver = new YangToJavaNamingConflictUtil();
+    private static final String BASE_DIR_PKG = "target.UnitTestCase.";
+    private static final String DIR_PATH = "exist1.exist2.exist3";
+    private static final String PKG_INFO = "package-info.java";
+    private static final String BASE_PKG = "target/UnitTestCase";
+    private static final String TEST_DATA_1 = "This is to append a text to the file first1\n";
 
     /**
      * Unit test for private constructor.
      *
-     * @throws SecurityException if any security violation is observed.
-     * @throws NoSuchMethodException if when the method is not found.
-     * @throws IllegalArgumentException if there is illegal argument found.
-     * @throws InstantiationException if instantiation is provoked for the
-     *             private constructor.
-     * @throws IllegalAccessException if instance is provoked or a method is
-     *             provoked.
+     * @throws SecurityException         if any security violation is observed.
+     * @throws NoSuchMethodException     if when the method is not found.
+     * @throws IllegalArgumentException  if there is illegal argument found.
+     * @throws InstantiationException    if instantiation is provoked for the
+     *                                   private constructor.
+     * @throws IllegalAccessException    if instance is provoked or a method is
+     *                                   provoked.
      * @throws InvocationTargetException when an exception occurs by the method
-     *             or constructor.
+     *                                   or constructor.
      */
     @Test
     public void callPrivateConstructors() throws SecurityException, NoSuchMethodException, IllegalArgumentException,
             InstantiationException, IllegalAccessException, InvocationTargetException {
 
-        Class<?>[] classesToConstruct = {JavaIdentifierSyntax.class };
+        Class<?>[] classesToConstruct = {JavaIdentifierSyntax.class};
         for (Class<?> clazz : classesToConstruct) {
             Constructor<?> constructor = clazz.getDeclaredConstructor();
             constructor.setAccessible(true);
@@ -282,4 +291,23 @@
         String path = getPackageDirPathFromJavaJPackage(PARENT_WITH_PERIOD);
         assertThat(path.equals(PARENT_PACKAGE), is(true));
     }
+
+
+    /**
+     * This test  case checks whether the package is existing.
+     *
+     * @throws IOException when failed to create a test file
+     */
+    @Test
+    public void packageExistTest() throws IOException {
+
+        String strPath = BASE_DIR_PKG + DIR_PATH;
+        File createDir = new File(strPath.replace(PERIOD, SLASH));
+        createDir.mkdirs();
+        File createFile = new File(createDir + SLASH + PKG_INFO);
+        createFile.createNewFile();
+        assertThat(true, is(doesPackageExist(strPath)));
+        createDir.delete();
+        deleteDirectory(createDir);
+    }
 }
diff --git a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/NotificationTranslatorTest.java b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/NotificationTranslatorTest.java
deleted file mode 100644
index e45b1d8..0000000
--- a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/NotificationTranslatorTest.java
+++ /dev/null
@@ -1,56 +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.translator.tojava.utils;
-
-import java.io.IOException;
-
-import org.junit.Test;
-import org.onosproject.yangutils.datamodel.YangNode;
-import org.onosproject.yangutils.parser.exceptions.ParserException;
-import org.onosproject.yangutils.parser.impl.YangUtilsParserManager;
-import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
-
-import static org.onosproject.yangutils.translator.tojava.JavaCodeGeneratorUtil.generateJavaCode;
-import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.deleteDirectory;
-
-/**
- * Unit tests for union translator.
- */
-public final class NotificationTranslatorTest {
-
-    private final YangUtilsParserManager manager = new YangUtilsParserManager();
-
-    /**
-     * Checks union translation should not result in any exception.
-     */
-    @Test
-    public void processUnionTranslator()
-            throws IOException, ParserException {
-
-        String userDir = System.getProperty("user.dir");
-        YangNode node = manager.getDataModel("src/test/resources/NotificationTest.yang");
-
-        YangPluginConfig yangPluginConfig = new YangPluginConfig();
-        yangPluginConfig.setCodeGenDir(userDir + "/target/NotificationTest/");
-
-        generateJavaCode(node, yangPluginConfig);
-
-        deleteDirectory(userDir + "/target/NotificationTest/");
-    }
-
-    // TODO enhance the test cases, after having a framework of translator test.
-}
diff --git a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/RpcTranslatorTest.java b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/RpcTranslatorTest.java
deleted file mode 100644
index 04ef477..0000000
--- a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/RpcTranslatorTest.java
+++ /dev/null
@@ -1,55 +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.translator.tojava.utils;
-
-import java.io.IOException;
-
-import org.junit.Test;
-import org.onosproject.yangutils.datamodel.YangNode;
-import org.onosproject.yangutils.parser.exceptions.ParserException;
-import org.onosproject.yangutils.parser.impl.YangUtilsParserManager;
-import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
-
-import static org.onosproject.yangutils.translator.tojava.JavaCodeGeneratorUtil.generateJavaCode;
-import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.deleteDirectory;
-
-/**
- * Unit tests for rpc translator.
- */
-public final class RpcTranslatorTest {
-
-    private final YangUtilsParserManager manager = new YangUtilsParserManager();
-
-    /**
-     * Checks rpc translation should not result in any exception.
-     */
-    @Test
-    public void processRpcTranslator()
-            throws IOException, ParserException {
-
-        String userDir = System.getProperty("user.dir");
-        YangNode node = manager.getDataModel("src/test/resources/RpcTranslator.yang");
-
-        YangPluginConfig yangPluginConfig = new YangPluginConfig();
-        yangPluginConfig.setCodeGenDir(userDir + "/target/RpcTestGenFile/");
-
-        generateJavaCode(node, yangPluginConfig);
-
-        deleteDirectory(userDir + "/target/RpcTestGenFile/");
-    }
-    // TODO enhance the test cases, after having a framework of translator test.
-}
diff --git a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/UnionTranslatorTest.java b/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/UnionTranslatorTest.java
deleted file mode 100644
index 0441c87..0000000
--- a/utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/UnionTranslatorTest.java
+++ /dev/null
@@ -1,56 +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.translator.tojava.utils;
-
-import java.io.IOException;
-
-import org.junit.Test;
-import org.onosproject.yangutils.datamodel.YangNode;
-import org.onosproject.yangutils.parser.exceptions.ParserException;
-import org.onosproject.yangutils.parser.impl.YangUtilsParserManager;
-import org.onosproject.yangutils.utils.io.impl.YangPluginConfig;
-
-import static org.onosproject.yangutils.translator.tojava.JavaCodeGeneratorUtil.generateJavaCode;
-import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.deleteDirectory;
-
-/**
- * Unit tests for union translator.
- */
-public final class UnionTranslatorTest {
-
-    private final YangUtilsParserManager manager = new YangUtilsParserManager();
-
-    /**
-     * Checks union translation should not result in any exception.
-     */
-    @Test
-    public void processUnionTranslator()
-            throws IOException, ParserException {
-
-        String userDir = System.getProperty("user.dir");
-        YangNode node = manager.getDataModel("src/test/resources/UnionTranslator.yang");
-
-        YangPluginConfig yangPluginConfig = new YangPluginConfig();
-        yangPluginConfig.setCodeGenDir("target/UnionTestGenFile/");
-
-        generateJavaCode(node, yangPluginConfig);
-
-        deleteDirectory(userDir + "/target/UnionTestGenFile/");
-    }
-
-    // TODO enhance the test cases, after having a framework of translator test.
-}