atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shweth...@apache.org
Subject [1/2] incubator-atlas git commit: ATLAS-474 Server does not start if the type is updated with same super type class information (dkantor via shwethags)
Date Fri, 11 Mar 2016 05:44:17 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master 046ff52b0 -> 3cdd9f57d


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/typesystem/src/test/java/org/apache/atlas/typesystem/types/HierarchicalTypeTest.java
----------------------------------------------------------------------
diff --git a/typesystem/src/test/java/org/apache/atlas/typesystem/types/HierarchicalTypeTest.java b/typesystem/src/test/java/org/apache/atlas/typesystem/types/HierarchicalTypeTest.java
index 4e83492..81da0be 100644
--- a/typesystem/src/test/java/org/apache/atlas/typesystem/types/HierarchicalTypeTest.java
+++ b/typesystem/src/test/java/org/apache/atlas/typesystem/types/HierarchicalTypeTest.java
@@ -18,7 +18,8 @@
 
 package org.apache.atlas.typesystem.types;
 
-import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+
 import org.apache.atlas.typesystem.TypesDef;
 import org.apache.atlas.typesystem.types.utils.TypesUtil;
 import org.testng.Assert;
@@ -38,7 +39,7 @@ public abstract class HierarchicalTypeTest<T extends HierarchicalType> extends T
         //Add super type with optional attribute
         HierarchicalTypeDefinition superType =
                 getTypeDefinition(newName(), TypesUtil.createOptionalAttrDef("s", DataTypes.INT_TYPE));
-        classType = getTypeDefinition(classType.typeName, ImmutableList.of(superType.typeName),
+        classType = getTypeDefinition(classType.typeName, ImmutableSet.of(superType.typeName),
                 TypesUtil.createRequiredAttrDef("a", DataTypes.INT_TYPE));
         ts.updateTypes(getTypesDef(superType, classType));
 
@@ -47,7 +48,7 @@ public abstract class HierarchicalTypeTest<T extends HierarchicalType> extends T
         HierarchicalTypeDefinition superTypeRequired =
                 getTypeDefinition(newName(), TypesUtil.createRequiredAttrDef("s", DataTypes.INT_TYPE));
         classType = getTypeDefinition(classType.typeName,
-                ImmutableList.of(superTypeRequired.typeName, superType.typeName),
+                ImmutableSet.of(superTypeRequired.typeName, superType.typeName),
                 TypesUtil.createRequiredAttrDef("a", DataTypes.INT_TYPE));
         try {
             ts.updateTypes(getTypesDef(superTypeRequired, classType));
@@ -69,7 +70,7 @@ public abstract class HierarchicalTypeTest<T extends HierarchicalType> extends T
     @Override
     protected abstract HierarchicalTypeDefinition<T> getTypeDefinition(String name, AttributeDefinition... attributes);
 
-    protected abstract HierarchicalTypeDefinition<T> getTypeDefinition(String name, ImmutableList<String> superTypes,
+    protected abstract HierarchicalTypeDefinition<T> getTypeDefinition(String name, ImmutableSet<String> superTypes,
                                                                        AttributeDefinition... attributes);
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/typesystem/src/test/java/org/apache/atlas/typesystem/types/TraitTest.java
----------------------------------------------------------------------
diff --git a/typesystem/src/test/java/org/apache/atlas/typesystem/types/TraitTest.java b/typesystem/src/test/java/org/apache/atlas/typesystem/types/TraitTest.java
index b7ac8f8..31bfb2c 100755
--- a/typesystem/src/test/java/org/apache/atlas/typesystem/types/TraitTest.java
+++ b/typesystem/src/test/java/org/apache/atlas/typesystem/types/TraitTest.java
@@ -19,6 +19,8 @@
 package org.apache.atlas.typesystem.types;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+
 import org.apache.atlas.AtlasException;
 import org.apache.atlas.typesystem.IStruct;
 import org.apache.atlas.typesystem.ITypedStruct;
@@ -68,11 +70,11 @@ public class TraitTest extends HierarchicalTypeTest<TraitType> {
         HierarchicalTypeDefinition A = createTraitTypeDef("A", null, createRequiredAttrDef("a", DataTypes.INT_TYPE),
                 createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE), createOptionalAttrDef("c", DataTypes.BYTE_TYPE),
                 createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
-        HierarchicalTypeDefinition B = createTraitTypeDef("B", ImmutableList.<String>of("A"),
+        HierarchicalTypeDefinition B = createTraitTypeDef("B", ImmutableSet.<String>of("A"),
                 createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
         HierarchicalTypeDefinition C =
-                createTraitTypeDef("C", ImmutableList.<String>of("A"), createOptionalAttrDef("c", DataTypes.BYTE_TYPE));
-        HierarchicalTypeDefinition D = createTraitTypeDef("D", ImmutableList.<String>of("B", "C"),
+                createTraitTypeDef("C", ImmutableSet.<String>of("A"), createOptionalAttrDef("c", DataTypes.BYTE_TYPE));
+        HierarchicalTypeDefinition D = createTraitTypeDef("D", ImmutableSet.<String>of("B", "C"),
                 createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
 
         defineTraits(A, B, C, D);
@@ -176,11 +178,11 @@ public class TraitTest extends HierarchicalTypeTest<TraitType> {
         HierarchicalTypeDefinition A = createTraitTypeDef("A", null, createRequiredAttrDef("a", DataTypes.INT_TYPE),
                 createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE), createOptionalAttrDef("c", DataTypes.BYTE_TYPE),
                 createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
-        HierarchicalTypeDefinition B = createTraitTypeDef("B", ImmutableList.<String>of("A"),
+        HierarchicalTypeDefinition B = createTraitTypeDef("B", ImmutableSet.<String>of("A"),
                 createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
-        HierarchicalTypeDefinition C = createTraitTypeDef("C", ImmutableList.<String>of("A"),
+        HierarchicalTypeDefinition C = createTraitTypeDef("C", ImmutableSet.<String>of("A"),
                 createOptionalAttrDef("c", DataTypes.BYTE_TYPE));
-        HierarchicalTypeDefinition D = createTraitTypeDef("D", ImmutableList.<String>of("B", "C"),
+        HierarchicalTypeDefinition D = createTraitTypeDef("D", ImmutableSet.<String>of("B", "C"),
                 createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
 
         defineTraits(B, D, A, C);
@@ -224,7 +226,7 @@ public class TraitTest extends HierarchicalTypeTest<TraitType> {
     }
 
     @Override
-    protected HierarchicalTypeDefinition<TraitType> getTypeDefinition(String name, ImmutableList<String> superTypes,
+    protected HierarchicalTypeDefinition<TraitType> getTypeDefinition(String name, ImmutableSet<String> superTypes,
                                                                       AttributeDefinition... attributes) {
         return new HierarchicalTypeDefinition(TraitType.class, name, null, superTypes, attributes);
     }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeInheritanceTest.java
----------------------------------------------------------------------
diff --git a/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeInheritanceTest.java b/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeInheritanceTest.java
index a2dd759..c13ef3a 100644
--- a/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeInheritanceTest.java
+++ b/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeInheritanceTest.java
@@ -18,7 +18,8 @@
 
 package org.apache.atlas.typesystem.types;
 
-import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+
 import org.apache.atlas.AtlasException;
 import org.apache.atlas.typesystem.IStruct;
 import org.apache.atlas.typesystem.ITypedInstance;
@@ -54,7 +55,7 @@ public class TypeInheritanceTest extends BaseTest {
         HierarchicalTypeDefinition A = createClassTypeDef("A", null, createRequiredAttrDef("a", DataTypes.INT_TYPE));
 
         HierarchicalTypeDefinition B =
-                createClassTypeDef("B", ImmutableList.of("A"), createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
+                createClassTypeDef("B", ImmutableSet.of("A"), createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
 
         defineClasses(A, B);
 
@@ -83,7 +84,7 @@ public class TypeInheritanceTest extends BaseTest {
                 createRequiredAttrDef("b", DataTypes.BOOLEAN_TYPE));
 
         HierarchicalTypeDefinition B =
-                createClassTypeDef("B", ImmutableList.of("A"), createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
+                createClassTypeDef("B", ImmutableSet.of("A"), createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
 
         defineClasses(A, B);
 
@@ -115,13 +116,13 @@ public class TypeInheritanceTest extends BaseTest {
         HierarchicalTypeDefinition A = createClassTypeDef("A", null, createRequiredAttrDef("a", DataTypes.INT_TYPE));
 
         HierarchicalTypeDefinition B =
-                createClassTypeDef("B", ImmutableList.of("A"), createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
+                createClassTypeDef("B", ImmutableSet.of("A"), createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
 
         HierarchicalTypeDefinition C =
-                createClassTypeDef("C", ImmutableList.of("B"), createOptionalAttrDef("c", DataTypes.BYTE_TYPE));
+                createClassTypeDef("C", ImmutableSet.of("B"), createOptionalAttrDef("c", DataTypes.BYTE_TYPE));
 
         HierarchicalTypeDefinition D =
-                createClassTypeDef("D", ImmutableList.of("C"), createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
+                createClassTypeDef("D", ImmutableSet.of("C"), createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
 
         defineClasses(A, B, C, D);
 
@@ -168,11 +169,11 @@ public class TypeInheritanceTest extends BaseTest {
                 createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE), createOptionalAttrDef("c", DataTypes.BYTE_TYPE),
                 createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
         HierarchicalTypeDefinition B =
-                createTraitTypeDef("B", ImmutableList.of("A"), createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
+                createTraitTypeDef("B", ImmutableSet.of("A"), createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
         HierarchicalTypeDefinition C =
-                createTraitTypeDef("C", ImmutableList.of("A"), createOptionalAttrDef("c", DataTypes.BYTE_TYPE));
+                createTraitTypeDef("C", ImmutableSet.of("A"), createOptionalAttrDef("c", DataTypes.BYTE_TYPE));
         HierarchicalTypeDefinition D =
-                createTraitTypeDef("D", ImmutableList.of("B", "C"), createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
+                createTraitTypeDef("D", ImmutableSet.of("B", "C"), createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
 
         defineTraits(A, B, C, D);
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeSystemTest.java
----------------------------------------------------------------------
diff --git a/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeSystemTest.java b/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeSystemTest.java
index 4ee9f9c..f9f5f21 100755
--- a/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeSystemTest.java
+++ b/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeSystemTest.java
@@ -19,6 +19,8 @@
 package org.apache.atlas.typesystem.types;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+
 import org.apache.atlas.AtlasException;
 import org.apache.atlas.typesystem.types.utils.TypesUtil;
 import org.apache.commons.lang3.RandomStringUtils;
@@ -26,9 +28,12 @@ import org.testng.Assert;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
+
 import scala.actors.threadpool.Arrays;
+
 import java.util.Collections;
 import java.util.List;
+
 import static org.apache.atlas.typesystem.types.utils.TypesUtil.createClassTypeDef;
 import static org.apache.atlas.typesystem.types.utils.TypesUtil.createRequiredAttrDef;
 import static org.apache.atlas.typesystem.types.utils.TypesUtil.createStructTypeDef;
@@ -68,7 +73,7 @@ public class TypeSystemTest extends BaseTest {
         typeName = "trait_type";
         typeDescription = typeName + description;
         HierarchicalTypeDefinition<TraitType> trait = TypesUtil
-            .createTraitTypeDef(typeName, typeDescription, ImmutableList.<String>of(),
+            .createTraitTypeDef(typeName, typeDescription, ImmutableSet.<String>of(),
                 TypesUtil.createRequiredAttrDef("type", DataTypes.STRING_TYPE));
         getTypeSystem().defineTraitType(trait);
         Assert.assertTrue(getTypeSystem().getTypeNames().contains(typeName));
@@ -79,7 +84,7 @@ public class TypeSystemTest extends BaseTest {
         typeName = "class_type";
         typeDescription = typeName + description;
         HierarchicalTypeDefinition<ClassType> classType = TypesUtil
-            .createClassTypeDef(typeName, typeDescription, ImmutableList.<String>of(),
+            .createClassTypeDef(typeName, typeDescription, ImmutableSet.<String>of(),
                 TypesUtil.createRequiredAttrDef("type", DataTypes.STRING_TYPE));
         getTypeSystem().defineClassType(classType);
         Assert.assertTrue(getTypeSystem().getTypeNames().contains(typeName));
@@ -107,20 +112,20 @@ public class TypeSystemTest extends BaseTest {
     @Test
     public void testGetTraitsNames() throws Exception {
         HierarchicalTypeDefinition<TraitType> classificationTraitDefinition = TypesUtil
-                .createTraitTypeDef("Classification", ImmutableList.<String>of(),
+                .createTraitTypeDef("Classification", ImmutableSet.<String>of(),
                         TypesUtil.createRequiredAttrDef("tag", DataTypes.STRING_TYPE));
         HierarchicalTypeDefinition<TraitType> piiTrait =
-                TypesUtil.createTraitTypeDef("PII", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("PII", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> phiTrait =
-                TypesUtil.createTraitTypeDef("PHI", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("PHI", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> pciTrait =
-                TypesUtil.createTraitTypeDef("PCI", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("PCI", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> soxTrait =
-                TypesUtil.createTraitTypeDef("SOX", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("SOX", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> secTrait =
-                TypesUtil.createTraitTypeDef("SEC", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("SEC", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> financeTrait =
-                TypesUtil.createTraitTypeDef("Finance", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("Finance", ImmutableSet.<String>of());
 
         getTypeSystem().defineTypes(ImmutableList.<EnumTypeDefinition>of(),
                 ImmutableList.<StructTypeDefinition>of(),
@@ -152,11 +157,11 @@ public class TypeSystemTest extends BaseTest {
                 createStructTypeDef(structName, createRequiredAttrDef(attrType, DataTypes.STRING_TYPE));
 
         String className = random();
-        HierarchicalTypeDefinition<ClassType> classType = createClassTypeDef(className, ImmutableList.<String>of(),
+        HierarchicalTypeDefinition<ClassType> classType = createClassTypeDef(className, ImmutableSet.<String>of(),
                 createRequiredAttrDef(attrType, DataTypes.STRING_TYPE));
 
         String traitName = random();
-        HierarchicalTypeDefinition<TraitType> traitType = createTraitTypeDef(traitName, ImmutableList.<String>of(),
+        HierarchicalTypeDefinition<TraitType> traitType = createTraitTypeDef(traitName, ImmutableSet.<String>of(),
                 createRequiredAttrDef(attrType, DataTypes.INT_TYPE));
 
         ts.defineTypes(ImmutableList.of(orgLevelEnum), ImmutableList.of(structType),
@@ -165,9 +170,9 @@ public class TypeSystemTest extends BaseTest {
 
     @Test
     public void testHierarchy() throws AtlasException {
-        HierarchicalTypeDefinition<ClassType> a = TypesUtil.createClassTypeDef("a", ImmutableList.<String>of());
-        HierarchicalTypeDefinition<ClassType> b = TypesUtil.createClassTypeDef("B", ImmutableList.of("a"));
-        HierarchicalTypeDefinition<ClassType> c = TypesUtil.createClassTypeDef("C", ImmutableList.of("B"));
+        HierarchicalTypeDefinition<ClassType> a = TypesUtil.createClassTypeDef("a", ImmutableSet.<String>of());
+        HierarchicalTypeDefinition<ClassType> b = TypesUtil.createClassTypeDef("B", ImmutableSet.of("a"));
+        HierarchicalTypeDefinition<ClassType> c = TypesUtil.createClassTypeDef("C", ImmutableSet.of("B"));
 
         TypeSystem ts = getTypeSystem();
         ts.defineTypes(ImmutableList.<EnumTypeDefinition>of(), ImmutableList.<StructTypeDefinition>of(),
@@ -192,18 +197,18 @@ public class TypeSystemTest extends BaseTest {
 
         HierarchicalTypeDefinition<TraitType> trait_A = createTraitTypeDef("trait_A", null,
                 createRequiredAttrDef("t_A", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<TraitType> trait_B = createTraitTypeDef("trait_B", ImmutableList.<String>of("trait_A"),
+        HierarchicalTypeDefinition<TraitType> trait_B = createTraitTypeDef("trait_B", ImmutableSet.<String>of("trait_A"),
                 createRequiredAttrDef("t_B", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<TraitType> trait_C = createTraitTypeDef("trait_C", ImmutableList.<String>of("trait_A"),
+        HierarchicalTypeDefinition<TraitType> trait_C = createTraitTypeDef("trait_C", ImmutableSet.<String>of("trait_A"),
                 createRequiredAttrDef("t_C", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<TraitType> trait_D = createTraitTypeDef("trait_D", ImmutableList.<String>of("trait_B", "trait_C"),
+        HierarchicalTypeDefinition<TraitType> trait_D = createTraitTypeDef("trait_D", ImmutableSet.<String>of("trait_B", "trait_C"),
                 createRequiredAttrDef("t_D", DataTypes.STRING_TYPE));
 
         HierarchicalTypeDefinition<ClassType> class_A = createClassTypeDef("class_A", null,
                 createRequiredAttrDef("c_A", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<ClassType> class_B = createClassTypeDef("class_B", ImmutableList.<String>of("class_A"),
+        HierarchicalTypeDefinition<ClassType> class_B = createClassTypeDef("class_B", ImmutableSet.<String>of("class_A"),
                 createRequiredAttrDef("c_B", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<ClassType> class_C = createClassTypeDef("class_C", ImmutableList.<String>of("class_B"),
+        HierarchicalTypeDefinition<ClassType> class_C = createClassTypeDef("class_C", ImmutableSet.<String>of("class_B"),
                 createRequiredAttrDef("c_C", DataTypes.STRING_TYPE));
 
         ts.defineTypes(ImmutableList.<EnumTypeDefinition>of(), ImmutableList.of(struct_A, struct_B),

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/typesystem/src/test/java/org/apache/atlas/typesystem/types/ValidationTest.java
----------------------------------------------------------------------
diff --git a/typesystem/src/test/java/org/apache/atlas/typesystem/types/ValidationTest.java b/typesystem/src/test/java/org/apache/atlas/typesystem/types/ValidationTest.java
index 67641cc..0748f8f 100644
--- a/typesystem/src/test/java/org/apache/atlas/typesystem/types/ValidationTest.java
+++ b/typesystem/src/test/java/org/apache/atlas/typesystem/types/ValidationTest.java
@@ -18,6 +18,8 @@
 package org.apache.atlas.typesystem.types;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+
 import org.apache.atlas.typesystem.types.utils.TypesUtil;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -74,14 +76,14 @@ public class ValidationTest {
     public void testClassType(String name) {
         AttributeDefinition value = TypesUtil.createRequiredAttrDef("name", "type");
         ;
-        TypesUtil.createClassTypeDef(name, ImmutableList.of("super"), value);
+        TypesUtil.createClassTypeDef(name, ImmutableSet.of("super"), value);
     }
 
     @Test(dataProvider = "classTypeData", expectedExceptions = {IllegalArgumentException.class})
     public void testTraitType(String name) {
         AttributeDefinition value = TypesUtil.createRequiredAttrDef("name", "type");
         ;
-        TypesUtil.createTraitTypeDef(name, ImmutableList.of("super"), value);
+        TypesUtil.createTraitTypeDef(name, ImmutableSet.of("super"), value);
     }
 
     @Test
@@ -89,15 +91,15 @@ public class ValidationTest {
         AttributeDefinition attribute = TypesUtil.createRequiredAttrDef("name", "type");
 
         //class with no attributes
-        TypesUtil.createClassTypeDef("name", ImmutableList.of("super"));
+        TypesUtil.createClassTypeDef("name", ImmutableSet.of("super"));
 
         //class with no super types
-        TypesUtil.createClassTypeDef("name", ImmutableList.<String>of(), attribute);
+        TypesUtil.createClassTypeDef("name", ImmutableSet.<String>of(), attribute);
 
         //trait with no attributes
-        TypesUtil.createTraitTypeDef("name", ImmutableList.of("super"));
+        TypesUtil.createTraitTypeDef("name", ImmutableSet.of("super"));
 
         //trait with no super types
-        TypesUtil.createTraitTypeDef("name", ImmutableList.<String>of(), attribute);
+        TypesUtil.createTraitTypeDef("name", ImmutableSet.<String>of(), attribute);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/typesystem/src/test/scala/org/apache/atlas/typesystem/json/SerializationTest.scala
----------------------------------------------------------------------
diff --git a/typesystem/src/test/scala/org/apache/atlas/typesystem/json/SerializationTest.scala b/typesystem/src/test/scala/org/apache/atlas/typesystem/json/SerializationTest.scala
index 7b7df09..f98ca93 100755
--- a/typesystem/src/test/scala/org/apache/atlas/typesystem/json/SerializationTest.scala
+++ b/typesystem/src/test/scala/org/apache/atlas/typesystem/json/SerializationTest.scala
@@ -28,6 +28,7 @@ import org.json4s.native.Serialization.{write => swrite, _}
 import org.json4s.{NoTypeHints, _}
 import org.testng.Assert
 import org.testng.annotations.{BeforeMethod,Test}
+import com.google.common.collect.ImmutableSet
 
 class SerializationTest extends BaseTest {
 
@@ -81,13 +82,13 @@ class SerializationTest extends BaseTest {
             TypesUtil.createOptionalAttrDef("c", DataTypes.BYTE_TYPE),
             TypesUtil.createOptionalAttrDef("d", DataTypes.SHORT_TYPE))
         val B: HierarchicalTypeDefinition[TraitType] = TypesUtil.createTraitTypeDef(
-            "B", ImmutableList.of[String]("A"),
+            "B", ImmutableSet.of[String]("A"),
             TypesUtil.createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE))
         val C: HierarchicalTypeDefinition[TraitType] = TypesUtil.createTraitTypeDef(
-            "C", ImmutableList.of[String]("A"),
+            "C", ImmutableSet.of[String]("A"),
             TypesUtil.createOptionalAttrDef("c", DataTypes.BYTE_TYPE))
         val D: HierarchicalTypeDefinition[TraitType] = TypesUtil.createTraitTypeDef(
-            "D", ImmutableList.of[String]("B", "C"),
+            "D", ImmutableSet.of[String]("B", "C"),
             TypesUtil.createOptionalAttrDef("d", DataTypes.SHORT_TYPE))
 
         defineTraits(A, B, C, D)
@@ -130,21 +131,21 @@ class SerializationTest extends BaseTest {
   def defineHRTypes(ts: TypeSystem) : Unit = {
     val deptTypeDef: HierarchicalTypeDefinition[ClassType] = TypesUtil.createClassTypeDef(
       "Department",
-      ImmutableList.of[String],
+      ImmutableSet.of[String],
       TypesUtil.createRequiredAttrDef("name", DataTypes.STRING_TYPE),
       new AttributeDefinition("employees", String.format("array<%s>", "Person"),
         Multiplicity.COLLECTION, true, "department"))
     val personTypeDef: HierarchicalTypeDefinition[ClassType] = TypesUtil.createClassTypeDef(
-      "Person", ImmutableList.of[String],
+      "Person", ImmutableSet.of[String],
       TypesUtil.createRequiredAttrDef("name", DataTypes.STRING_TYPE),
       new AttributeDefinition("department", "Department", Multiplicity.REQUIRED, false, "employees"),
       new AttributeDefinition("manager", "Manager", Multiplicity.OPTIONAL, false, "subordinates"))
     val managerTypeDef: HierarchicalTypeDefinition[ClassType] = TypesUtil.createClassTypeDef(
-      "Manager", ImmutableList.of[String]("Person"),
+      "Manager", ImmutableSet.of[String]("Person"),
       new AttributeDefinition("subordinates", String.format("array<%s>", "Person"),
         Multiplicity.COLLECTION, false, "manager"))
     val securityClearanceTypeDef: HierarchicalTypeDefinition[TraitType] =
-      TypesUtil.createTraitTypeDef("SecurityClearance", ImmutableList.of[String],
+      TypesUtil.createTraitTypeDef("SecurityClearance", ImmutableSet.of[String],
         TypesUtil.createRequiredAttrDef("level", DataTypes.INT_TYPE))
 
     ts.defineTypes(ImmutableList.of[EnumTypeDefinition], ImmutableList.of[StructTypeDefinition],

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/webapp/src/main/java/org/apache/atlas/examples/QuickStart.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/examples/QuickStart.java b/webapp/src/main/java/org/apache/atlas/examples/QuickStart.java
index dc5eaae..a2d7155 100755
--- a/webapp/src/main/java/org/apache/atlas/examples/QuickStart.java
+++ b/webapp/src/main/java/org/apache/atlas/examples/QuickStart.java
@@ -20,6 +20,8 @@ package org.apache.atlas.examples;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+
 import org.apache.atlas.ApplicationProperties;
 import org.apache.atlas.AtlasClient;
 import org.apache.atlas.AtlasException;
@@ -37,7 +39,6 @@ import org.apache.atlas.typesystem.types.IDataType;
 import org.apache.atlas.typesystem.types.Multiplicity;
 import org.apache.atlas.typesystem.types.StructTypeDefinition;
 import org.apache.atlas.typesystem.types.TraitType;
-import org.apache.atlas.typesystem.types.TypeUtils;
 import org.apache.atlas.typesystem.types.utils.TypesUtil;
 import org.apache.commons.configuration.Configuration;
 import org.codehaus.jettison.json.JSONArray;
@@ -143,7 +144,7 @@ public class QuickStart {
                         attrDef("dataType", DataTypes.STRING_TYPE), attrDef("comment", DataTypes.STRING_TYPE));
 
         HierarchicalTypeDefinition<ClassType> tblClsDef = TypesUtil
-                .createClassTypeDef(TABLE_TYPE, TABLE_TYPE, ImmutableList.of("DataSet"),
+                .createClassTypeDef(TABLE_TYPE, TABLE_TYPE, ImmutableSet.of("DataSet"),
                         new AttributeDefinition(DB_ATTRIBUTE, DATABASE_TYPE, Multiplicity.REQUIRED, false, null),
                         new AttributeDefinition("sd", STORAGE_DESC_TYPE, Multiplicity.REQUIRED, true, null),
                         attrDef("owner", DataTypes.STRING_TYPE), attrDef("createTime", DataTypes.LONG_TYPE),
@@ -155,7 +156,7 @@ public class QuickStart {
                                 Multiplicity.COLLECTION, true, null));
 
         HierarchicalTypeDefinition<ClassType> loadProcessClsDef = TypesUtil
-                .createClassTypeDef(LOAD_PROCESS_TYPE, LOAD_PROCESS_TYPE, ImmutableList.of("Process"),
+                .createClassTypeDef(LOAD_PROCESS_TYPE, LOAD_PROCESS_TYPE, ImmutableSet.of("Process"),
                         attrDef("userName", DataTypes.STRING_TYPE), attrDef("startTime", DataTypes.LONG_TYPE),
                         attrDef("endTime", DataTypes.LONG_TYPE),
                         attrDef("queryText", DataTypes.STRING_TYPE, Multiplicity.REQUIRED),

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/webapp/src/test/java/org/apache/atlas/notification/EntityNotificationIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/notification/EntityNotificationIT.java b/webapp/src/test/java/org/apache/atlas/notification/EntityNotificationIT.java
index cd4e743..7086c24 100644
--- a/webapp/src/test/java/org/apache/atlas/notification/EntityNotificationIT.java
+++ b/webapp/src/test/java/org/apache/atlas/notification/EntityNotificationIT.java
@@ -18,10 +18,11 @@
 
 package org.apache.atlas.notification;
 
-import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
 import com.google.inject.Inject;
 import com.sun.jersey.api.client.ClientResponse;
 import com.sun.jersey.api.client.WebResource;
+
 import org.apache.atlas.notification.entity.EntityNotification;
 import org.apache.atlas.typesystem.IReferenceableInstance;
 import org.apache.atlas.typesystem.IStruct;
@@ -42,6 +43,7 @@ import org.testng.annotations.Test;
 
 import javax.ws.rs.HttpMethod;
 import javax.ws.rs.core.Response;
+
 import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
@@ -181,7 +183,7 @@ public class EntityNotificationIT extends BaseResourceIT {
 
     private void createTrait(String traitName, String ... superTraitNames) throws Exception {
         HierarchicalTypeDefinition<TraitType> trait =
-            TypesUtil.createTraitTypeDef(traitName, ImmutableList.copyOf(superTraitNames));
+            TypesUtil.createTraitTypeDef(traitName, ImmutableSet.copyOf(superTraitNames));
 
         String traitDefinitionJSON = TypesSerialization$.MODULE$.toJson(trait, true);
         LOG.debug("Trait definition = " + traitDefinitionJSON);

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/webapp/src/test/java/org/apache/atlas/web/resources/BaseResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/resources/BaseResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/resources/BaseResourceIT.java
index 7b3ca1f..54d8d92 100755
--- a/webapp/src/test/java/org/apache/atlas/web/resources/BaseResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/resources/BaseResourceIT.java
@@ -20,11 +20,14 @@ package org.apache.atlas.web.resources;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
 import com.sun.jersey.api.client.Client;
 import com.sun.jersey.api.client.ClientResponse;
 import com.sun.jersey.api.client.WebResource;
 import com.sun.jersey.api.client.config.DefaultClientConfig;
+
 import kafka.consumer.ConsumerTimeoutException;
+
 import org.apache.atlas.ApplicationProperties;
 import org.apache.atlas.AtlasClient;
 import org.apache.atlas.AtlasServiceException;
@@ -62,6 +65,7 @@ import org.testng.annotations.BeforeClass;
 import javax.ws.rs.HttpMethod;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriBuilder;
+
 import java.util.List;
 
 /**
@@ -158,7 +162,7 @@ public abstract class BaseResourceIT {
         EnumTypeDefinition enumTypeDefinition = new EnumTypeDefinition("tableType", values);
 
         HierarchicalTypeDefinition<ClassType> tblClsDef = TypesUtil
-                .createClassTypeDef(HIVE_TABLE_TYPE, ImmutableList.of("DataSet"),
+                .createClassTypeDef(HIVE_TABLE_TYPE, ImmutableSet.of("DataSet"),
                         attrDef("owner", DataTypes.STRING_TYPE), attrDef("createTime", DataTypes.LONG_TYPE),
                         attrDef("lastAccessTime", DataTypes.DATE_TYPE),
                         attrDef("temporary", DataTypes.BOOLEAN_TYPE),
@@ -170,7 +174,7 @@ public abstract class BaseResourceIT {
                 new AttributeDefinition("serde2", "serdeType", Multiplicity.OPTIONAL, false, null));
 
         HierarchicalTypeDefinition<ClassType> loadProcessClsDef = TypesUtil
-                .createClassTypeDef(HIVE_PROCESS_TYPE, ImmutableList.of("Process"),
+                .createClassTypeDef(HIVE_PROCESS_TYPE, ImmutableSet.of("Process"),
                         attrDef("userName", DataTypes.STRING_TYPE), attrDef("startTime", DataTypes.INT_TYPE),
                         attrDef("endTime", DataTypes.LONG_TYPE),
                         attrDef("queryText", DataTypes.STRING_TYPE, Multiplicity.REQUIRED),
@@ -179,20 +183,20 @@ public abstract class BaseResourceIT {
                         attrDef("queryGraph", DataTypes.STRING_TYPE, Multiplicity.REQUIRED));
 
         HierarchicalTypeDefinition<TraitType> classificationTrait = TypesUtil
-                .createTraitTypeDef("classification", ImmutableList.<String>of(),
+                .createTraitTypeDef("classification", ImmutableSet.<String>of(),
                         TypesUtil.createRequiredAttrDef("tag", DataTypes.STRING_TYPE));
         HierarchicalTypeDefinition<TraitType> piiTrait =
-                TypesUtil.createTraitTypeDef("pii", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("pii", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> phiTrait =
-                TypesUtil.createTraitTypeDef("phi", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("phi", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> pciTrait =
-                TypesUtil.createTraitTypeDef("pci", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("pci", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> soxTrait =
-                TypesUtil.createTraitTypeDef("sox", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("sox", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> secTrait =
-                TypesUtil.createTraitTypeDef("sec", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("sec", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> financeTrait =
-                TypesUtil.createTraitTypeDef("finance", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("finance", ImmutableSet.<String>of());
 
         TypesDef typesDef = TypesUtil.getTypesDef(ImmutableList.of(enumTypeDefinition),
                 ImmutableList.of(structTypeDefinition),

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java
index 585da72..a8cd1ef 100755
--- a/webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java
@@ -19,6 +19,7 @@
 package org.apache.atlas.web.resources;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
 import com.google.inject.Inject;
 import com.sun.jersey.api.client.ClientResponse;
 import com.sun.jersey.api.client.WebResource;
@@ -190,7 +191,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
     public void testEntityDefinitionAcrossTypeUpdate() throws Exception {
         //create type
         HierarchicalTypeDefinition<ClassType> typeDefinition = TypesUtil
-                .createClassTypeDef(randomString(), ImmutableList.<String>of(),
+                .createClassTypeDef(randomString(), ImmutableSet.<String>of(),
                         TypesUtil.createUniqueRequiredAttrDef("name", DataTypes.STRING_TYPE));
         serviceClient.createType(TypesSerialization.toJson(typeDefinition, false));
 
@@ -200,7 +201,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
         String guid = serviceClient.createEntity(instance).getString(0);
 
         //update type - add attribute
-        typeDefinition = TypesUtil.createClassTypeDef(typeDefinition.typeName, ImmutableList.<String>of(),
+        typeDefinition = TypesUtil.createClassTypeDef(typeDefinition.typeName, ImmutableSet.<String>of(),
                 TypesUtil.createUniqueRequiredAttrDef("name", DataTypes.STRING_TYPE),
                 TypesUtil.createOptionalAttrDef("description", DataTypes.STRING_TYPE));
         TypesDef typeDef = TypesUtil.getTypesDef(ImmutableList.<EnumTypeDefinition>of(),
@@ -423,7 +424,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
     private String addNewType() throws Exception {
         String typeName = "test" + randomString();
         HierarchicalTypeDefinition<ClassType> testTypeDefinition = TypesUtil
-                .createClassTypeDef(typeName, ImmutableList.<String>of(),
+                .createClassTypeDef(typeName, ImmutableSet.<String>of(),
                         TypesUtil.createRequiredAttrDef("name", DataTypes.STRING_TYPE),
                         TypesUtil.createRequiredAttrDef("description", DataTypes.STRING_TYPE));
 
@@ -455,7 +456,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
     public void testAddTrait() throws Exception {
         traitName = "PII_Trait" + randomString();
         HierarchicalTypeDefinition<TraitType> piiTrait =
-                TypesUtil.createTraitTypeDef(traitName, ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef(traitName, ImmutableSet.<String>of());
         String traitDefinitionAsJSON = TypesSerialization$.MODULE$.toJson(piiTrait, true);
         LOG.debug("traitDefinitionAsJSON = " + traitDefinitionAsJSON);
         createType(traitDefinitionAsJSON);
@@ -499,7 +500,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
     public void testAddTraitWithAttribute() throws Exception {
         final String traitName = "PII_Trait" + randomString();
         HierarchicalTypeDefinition<TraitType> piiTrait = TypesUtil
-                .createTraitTypeDef(traitName, ImmutableList.<String>of(),
+                .createTraitTypeDef(traitName, ImmutableSet.<String>of(),
                         TypesUtil.createRequiredAttrDef("type", DataTypes.STRING_TYPE));
         String traitDefinitionAsJSON = TypesSerialization$.MODULE$.toJson(piiTrait, true);
         LOG.debug("traitDefinitionAsJSON = " + traitDefinitionAsJSON);
@@ -544,7 +545,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
     public void testAddTraitWithNoRegistration() throws Exception {
         final String traitName = "PII_Trait" + randomString();
         HierarchicalTypeDefinition<TraitType> piiTrait =
-                TypesUtil.createTraitTypeDef(traitName, ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef(traitName, ImmutableSet.<String>of());
         String traitDefinitionAsJSON = TypesSerialization$.MODULE$.toJson(piiTrait, true);
         LOG.debug("traitDefinitionAsJSON = " + traitDefinitionAsJSON);
 
@@ -601,7 +602,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
         final String guid = tableId._getId();
         final String traitName = "PII_Trait" + randomString();
         HierarchicalTypeDefinition<TraitType> piiTrait = TypesUtil
-                .createTraitTypeDef(traitName, ImmutableList.<String>of(),
+                .createTraitTypeDef(traitName, ImmutableSet.<String>of(),
                         TypesUtil.createRequiredAttrDef("type", DataTypes.STRING_TYPE));
         String traitDefinitionAsJSON = TypesSerialization$.MODULE$.toJson(piiTrait, true);
         createType(traitDefinitionAsJSON);
@@ -632,7 +633,7 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
         String attrValue = random();
 
         HierarchicalTypeDefinition<ClassType> classTypeDefinition = TypesUtil
-                .createClassTypeDef(classType, ImmutableList.<String>of(),
+                .createClassTypeDef(classType, ImmutableSet.<String>of(),
                         TypesUtil.createUniqueRequiredAttrDef(attrName, DataTypes.STRING_TYPE));
         TypesDef typesDef = TypesUtil.getTypesDef(ImmutableList.<EnumTypeDefinition>of(), ImmutableList.<StructTypeDefinition>of(),
                 ImmutableList.<HierarchicalTypeDefinition<TraitType>>of(),

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/webapp/src/test/java/org/apache/atlas/web/resources/MetadataDiscoveryJerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/resources/MetadataDiscoveryJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/resources/MetadataDiscoveryJerseyResourceIT.java
index d255b75..073eb1d 100755
--- a/webapp/src/test/java/org/apache/atlas/web/resources/MetadataDiscoveryJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/resources/MetadataDiscoveryJerseyResourceIT.java
@@ -19,8 +19,10 @@
 package org.apache.atlas.web.resources;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
 import com.sun.jersey.api.client.ClientResponse;
 import com.sun.jersey.api.client.WebResource;
+
 import org.apache.atlas.AtlasClient;
 import org.apache.atlas.typesystem.Referenceable;
 import org.apache.atlas.typesystem.Struct;
@@ -42,6 +44,7 @@ import org.testng.annotations.Test;
 
 import javax.ws.rs.HttpMethod;
 import javax.ws.rs.core.Response;
+
 import java.util.List;
 
 /**
@@ -155,25 +158,25 @@ public class MetadataDiscoveryJerseyResourceIT extends BaseResourceIT {
 
     private void createTypes() throws Exception {
         HierarchicalTypeDefinition<ClassType> dslTestTypeDefinition = TypesUtil
-                .createClassTypeDef("dsl_test_type", ImmutableList.<String>of(),
+                .createClassTypeDef("dsl_test_type", ImmutableSet.<String>of(),
                         TypesUtil.createUniqueRequiredAttrDef("name", DataTypes.STRING_TYPE),
                         TypesUtil.createRequiredAttrDef("description", DataTypes.STRING_TYPE));
 
         HierarchicalTypeDefinition<TraitType> classificationTraitDefinition = TypesUtil
-                .createTraitTypeDef("Classification", ImmutableList.<String>of(),
+                .createTraitTypeDef("Classification", ImmutableSet.<String>of(),
                         TypesUtil.createRequiredAttrDef("tag", DataTypes.STRING_TYPE));
         HierarchicalTypeDefinition<TraitType> piiTrait =
-                TypesUtil.createTraitTypeDef("PII_TYPE", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("PII_TYPE", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> phiTrait =
-                TypesUtil.createTraitTypeDef("PHI", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("PHI", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> pciTrait =
-                TypesUtil.createTraitTypeDef("PCI", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("PCI", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> soxTrait =
-                TypesUtil.createTraitTypeDef("SOX", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("SOX", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> secTrait =
-                TypesUtil.createTraitTypeDef("SEC", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("SEC", ImmutableSet.<String>of());
         HierarchicalTypeDefinition<TraitType> financeTrait =
-                TypesUtil.createTraitTypeDef("Finance", ImmutableList.<String>of());
+                TypesUtil.createTraitTypeDef("Finance", ImmutableSet.<String>of());
 
         TypesDef typesDef = TypesUtil.getTypesDef(ImmutableList.<EnumTypeDefinition>of(), ImmutableList.<StructTypeDefinition>of(),
                         ImmutableList

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/3cdd9f57/webapp/src/test/java/org/apache/atlas/web/resources/TypesJerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/resources/TypesJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/resources/TypesJerseyResourceIT.java
index ac1b5ca..477e4bf 100755
--- a/webapp/src/test/java/org/apache/atlas/web/resources/TypesJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/resources/TypesJerseyResourceIT.java
@@ -19,8 +19,10 @@
 package org.apache.atlas.web.resources;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
 import com.sun.jersey.api.client.ClientResponse;
 import com.sun.jersey.api.client.WebResource;
+
 import org.apache.atlas.AtlasClient;
 import org.apache.atlas.typesystem.TypesDef;
 import org.apache.atlas.typesystem.json.TypesSerialization;
@@ -44,6 +46,7 @@ import org.testng.annotations.Test;
 
 import javax.ws.rs.HttpMethod;
 import javax.ws.rs.core.Response;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -92,7 +95,7 @@ public class TypesJerseyResourceIT extends BaseResourceIT {
     @Test
     public void testUpdate() throws Exception {
         HierarchicalTypeDefinition<ClassType> typeDefinition = TypesUtil
-                .createClassTypeDef(randomString(), ImmutableList.<String>of(),
+                .createClassTypeDef(randomString(), ImmutableSet.<String>of(),
                         TypesUtil.createUniqueRequiredAttrDef("name", DataTypes.STRING_TYPE));
         List<String> typesCreated = serviceClient.createType(TypesSerialization.toJson(typeDefinition, false));
         Assert.assertEquals(typesCreated.size(), 1);
@@ -100,11 +103,11 @@ public class TypesJerseyResourceIT extends BaseResourceIT {
 
         //Add super type
         HierarchicalTypeDefinition<ClassType> superTypeDefinition = TypesUtil
-                .createClassTypeDef(randomString(), ImmutableList.<String>of(),
+                .createClassTypeDef(randomString(), ImmutableSet.<String>of(),
                         TypesUtil.createOptionalAttrDef("sname", DataTypes.STRING_TYPE));
 
         typeDefinition = TypesUtil.createClassTypeDef(typeDefinition.typeName,
-                ImmutableList.of(superTypeDefinition.typeName),
+            ImmutableSet.of(superTypeDefinition.typeName),
                 TypesUtil.createUniqueRequiredAttrDef("name", DataTypes.STRING_TYPE),
                 TypesUtil.createOptionalAttrDef("description", DataTypes.STRING_TYPE));
         TypesDef typeDef = TypesUtil.getTypesDef(ImmutableList.<EnumTypeDefinition>of(),
@@ -206,7 +209,7 @@ public class TypesJerseyResourceIT extends BaseResourceIT {
 
         for (String traitName : traitNames) {
             HierarchicalTypeDefinition<TraitType> traitTypeDef =
-                    TypesUtil.createTraitTypeDef(traitName, ImmutableList.<String>of());
+                    TypesUtil.createTraitTypeDef(traitName, ImmutableSet.<String>of());
             String json = TypesSerialization$.MODULE$.toJson(traitTypeDef, true);
             createType(json);
         }
@@ -218,13 +221,13 @@ public class TypesJerseyResourceIT extends BaseResourceIT {
         ArrayList<HierarchicalTypeDefinition> typeDefinitions = new ArrayList<>();
 
         HierarchicalTypeDefinition<ClassType> databaseTypeDefinition = TypesUtil
-                .createClassTypeDef("database", ImmutableList.<String>of(),
+                .createClassTypeDef("database", ImmutableSet.<String>of(),
                         TypesUtil.createUniqueRequiredAttrDef("name", DataTypes.STRING_TYPE),
                         TypesUtil.createRequiredAttrDef("description", DataTypes.STRING_TYPE));
         typeDefinitions.add(databaseTypeDefinition);
 
         HierarchicalTypeDefinition<ClassType> tableTypeDefinition = TypesUtil
-                .createClassTypeDef("table", ImmutableList.<String>of(),
+                .createClassTypeDef("table", ImmutableSet.<String>of(),
                         TypesUtil.createUniqueRequiredAttrDef("name", DataTypes.STRING_TYPE),
                         TypesUtil.createRequiredAttrDef("description", DataTypes.STRING_TYPE),
                         TypesUtil.createOptionalAttrDef("columnNames", DataTypes.arrayTypeName(DataTypes.STRING_TYPE)),
@@ -236,7 +239,7 @@ public class TypesJerseyResourceIT extends BaseResourceIT {
         typeDefinitions.add(tableTypeDefinition);
 
         HierarchicalTypeDefinition<TraitType> fetlTypeDefinition = TypesUtil
-                .createTraitTypeDef("fetl", ImmutableList.<String>of(),
+                .createTraitTypeDef("fetl", ImmutableSet.<String>of(),
                         TypesUtil.createRequiredAttrDef("level", DataTypes.INT_TYPE));
         typeDefinitions.add(fetlTypeDefinition);
 


Mime
View raw message