http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/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
deleted file mode 100644
index c13ef3a..0000000
--- 
a/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeInheritanceTest.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.apache.atlas.typesystem.types;
-
-import com.google.common.collect.ImmutableSet;
-
-import org.apache.atlas.AtlasException;
-import org.apache.atlas.typesystem.IStruct;
-import org.apache.atlas.typesystem.ITypedInstance;
-import org.apache.atlas.typesystem.ITypedStruct;
-import org.apache.atlas.typesystem.Struct;
-import org.testng.Assert;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createClassTypeDef;
-import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createOptionalAttrDef;
-import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createRequiredAttrDef;
-import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createTraitTypeDef;
-
-/**
- * Unit tests for type inheritance.
- */
-public class TypeInheritanceTest extends BaseTest {
-
-    @BeforeMethod
-    public void setup() throws Exception {
-        TypeSystem.getInstance().reset();
-        super.setup();
-    }
-
-    /*
-     * Type Hierarchy is:
-     *   A(a)
-     *   B(b) extends A
-     */
-    @Test
-    public void testSimpleInheritance() throws AtlasException {
-        HierarchicalTypeDefinition A = createClassTypeDef("A", null, 
createRequiredAttrDef("a", DataTypes.INT_TYPE));
-
-        HierarchicalTypeDefinition B =
-                createClassTypeDef("B", ImmutableSet.of("A"), 
createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
-
-        defineClasses(A, B);
-
-        ClassType BType = getTypeSystem().getDataType(ClassType.class, "B");
-
-        Struct s1 = new Struct("B");
-        s1.set("b", true);
-        s1.set("a", 1);
-
-        ITypedInstance ts = BType.convert(s1, Multiplicity.REQUIRED);
-        Assert.assertEquals(ts.toString(), "{\n" +
-                "\tid : (type: B, id: <unassigned>)\n" +
-                "\tb : \ttrue\n" +
-                "\ta : \t1\n" +
-                "}");
-    }
-
-    /*
-     * Type Hierarchy is:
-     *   A(a, b)
-     *   B(b) extends A
-     */
-    @Test
-    public void testSimpleInheritanceWithOverrides() throws AtlasException {
-        HierarchicalTypeDefinition A = createClassTypeDef("A", null, 
createRequiredAttrDef("a", DataTypes.INT_TYPE),
-                createRequiredAttrDef("b", DataTypes.BOOLEAN_TYPE));
-
-        HierarchicalTypeDefinition B =
-                createClassTypeDef("B", ImmutableSet.of("A"), 
createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
-
-        defineClasses(A, B);
-
-        ClassType BType = getTypeSystem().getDataType(ClassType.class, "B");
-
-        Struct s1 = new Struct("B");
-        s1.set("b", true);
-        s1.set("a", 1);
-        s1.set("A.B.b", false);
-
-        ITypedInstance ts = BType.convert(s1, Multiplicity.REQUIRED);
-        Assert.assertEquals(ts.toString(), "{\n" +
-                "\tid : (type: B, id: <unassigned>)\n" +
-                "\tb : \ttrue\n" +
-                "\ta : \t1\n" +
-                "\tA.B.b : \tfalse\n" +
-                "}");
-    }
-
-    /*
-     * Type Hierarchy is:
-     *   A(a)
-     *   B(b) extends A
-     *   C(c) extends B
-     *   D(d) extends C
-     */
-    @Test
-    public void testMultiLevelInheritance() throws AtlasException {
-        HierarchicalTypeDefinition A = createClassTypeDef("A", null, 
createRequiredAttrDef("a", DataTypes.INT_TYPE));
-
-        HierarchicalTypeDefinition B =
-                createClassTypeDef("B", ImmutableSet.of("A"), 
createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
-
-        HierarchicalTypeDefinition C =
-                createClassTypeDef("C", ImmutableSet.of("B"), 
createOptionalAttrDef("c", DataTypes.BYTE_TYPE));
-
-        HierarchicalTypeDefinition D =
-                createClassTypeDef("D", ImmutableSet.of("C"), 
createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
-
-        defineClasses(A, B, C, D);
-
-        ClassType DType = getTypeSystem().getDataType(ClassType.class, "D");
-
-        Struct s1 = new Struct("D");
-        s1.set("d", 1);
-        s1.set("c", 1);
-        s1.set("b", true);
-        s1.set("a", 1);
-
-        ITypedInstance ts = DType.convert(s1, Multiplicity.REQUIRED);
-        Assert.assertEquals(ts.toString(), "{\n" +
-                "\tid : (type: D, id: <unassigned>)\n" +
-                "\td : \t1\n" +
-                "\tc : \t1\n" +
-                "\tb : \ttrue\n" +
-                "\ta : \t1\n" +
-                "}");
-    }
-
-    /*
-     * Type Hierarchy is:
-     *   A(a,b,c,d)
-     *   B(b) extends A
-     *   C(c) extends A
-     *   D(d) extends B,C
-     *
-     * - There are a total of 11 fields in an instance of D
-     * - an attribute that is hidden by a SubType can referenced by prefixing 
it with the
-     * complete Path.
-     *   For e.g. the 'b' attribute in A (that is a superType for B) is hidden 
the 'b' attribute
-     *   in B.
-     *   So it is availabel by the name 'A.B.D.b'
-     *
-     * - Another way to set attributes is to cast. Casting a 'D' instance of 
'B' makes the 'A.B.D
-     * .b' attribute
-     *   available as 'A.B.b'. Casting one more time to an 'A' makes the 
'A.B.b' attribute
-     *   available as 'b'.
-     */
-    @Test
-    public void testDiamondInheritance() throws AtlasException {
-        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", ImmutableSet.of("A"), 
createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE));
-        HierarchicalTypeDefinition C =
-                createTraitTypeDef("C", ImmutableSet.of("A"), 
createOptionalAttrDef("c", DataTypes.BYTE_TYPE));
-        HierarchicalTypeDefinition D =
-                createTraitTypeDef("D", ImmutableSet.of("B", "C"), 
createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
-
-        defineTraits(A, B, C, D);
-
-        TraitType DType = getTypeSystem().getDataType(TraitType.class, "D");
-
-        Struct s1 = new Struct("D");
-        s1.set("d", 1);
-        s1.set("c", 1);
-        s1.set("b", true);
-        s1.set("a", 1);
-        s1.set("A.B.D.b", true);
-        s1.set("A.B.D.c", 2);
-        s1.set("A.B.D.d", 2);
-
-        s1.set("A.C.D.a", 3);
-        s1.set("A.C.D.b", false);
-        s1.set("A.C.D.c", 3);
-        s1.set("A.C.D.d", 3);
-
-
-        ITypedStruct ts = DType.convert(s1, Multiplicity.REQUIRED);
-        Assert.assertEquals(ts.toString(), "{\n" +
-                "\td : \t1\n" +
-                "\tb : \ttrue\n" +
-                "\tc : \t1\n" +
-                "\ta : \t1\n" +
-                "\tA.B.D.b : \ttrue\n" +
-                "\tA.B.D.c : \t2\n" +
-                "\tA.B.D.d : \t2\n" +
-                "\tA.C.D.a : \t3\n" +
-                "\tA.C.D.b : \tfalse\n" +
-                "\tA.C.D.c : \t3\n" +
-                "\tA.C.D.d : \t3\n" +
-                "}");
-
-        /*
-         * cast to B and set the 'b' attribute on A.
-         */
-        TraitType BType = getTypeSystem().getDataType(TraitType.class, "B");
-        IStruct s2 = DType.castAs(ts, "B");
-        s2.set("A.B.b", false);
-
-        Assert.assertEquals(ts.toString(), "{\n" +
-                "\td : \t1\n" +
-                "\tb : \ttrue\n" +
-                "\tc : \t1\n" +
-                "\ta : \t1\n" +
-                "\tA.B.D.b : \tfalse\n" +
-                "\tA.B.D.c : \t2\n" +
-                "\tA.B.D.d : \t2\n" +
-                "\tA.C.D.a : \t3\n" +
-                "\tA.C.D.b : \tfalse\n" +
-                "\tA.C.D.c : \t3\n" +
-                "\tA.C.D.d : \t3\n" +
-                "}");
-
-        /*
-         * cast again to A and set the 'b' attribute on A.
-         */
-        IStruct s3 = BType.castAs(s2, "A");
-        s3.set("b", true);
-        Assert.assertEquals(ts.toString(), "{\n" +
-                "\td : \t1\n" +
-                "\tb : \ttrue\n" +
-                "\tc : \t1\n" +
-                "\ta : \t1\n" +
-                "\tA.B.D.b : \ttrue\n" +
-                "\tA.B.D.c : \t2\n" +
-                "\tA.B.D.d : \t2\n" +
-                "\tA.C.D.a : \t3\n" +
-                "\tA.C.D.b : \tfalse\n" +
-                "\tA.C.D.c : \t3\n" +
-                "\tA.C.D.d : \t3\n" +
-                "}");
-    }
-}

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/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
deleted file mode 100755
index 0ef5d10..0000000
--- 
a/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeSystemTest.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.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.exception.TypeExistsException;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
-import org.apache.commons.lang3.RandomStringUtils;
-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.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-
-import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createClassTypeDef;
-import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createOptionalAttrDef;
-import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createRequiredAttrDef;
-import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createStructTypeDef;
-import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createTraitTypeDef;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-
-public class TypeSystemTest extends BaseTest {
-
-    public static final long TEST_DATE_IN_LONG = 1418265358440L;
-    public static final String TEST_DATE_STRING = "2014-12-11T02:35:58.440Z";
-
-    @BeforeClass
-    public void setUp() throws Exception {
-        super.setup();
-    }
-
-    @AfterMethod
-    public void tearDown() throws Exception {
-        getTypeSystem().reset();
-    }
-
-    @Test
-    public void testGetTypeNames() throws Exception {
-        getTypeSystem().defineEnumType("enum_test", new EnumValue("0", 0), new 
EnumValue("1", 1), new EnumValue("2", 2),
-                new EnumValue("3", 3));
-        assertTrue(getTypeSystem().getTypeNames().contains("enum_test"));
-    }
-
-    @Test
-    public void testGetTypeDescription() throws Exception {
-        String typeName = "enum_type";
-        String description = "_description";
-        String typeDescription = typeName + description;
-        getTypeSystem().defineEnumType(typeName, typeDescription, new 
EnumValue("0", 0), new EnumValue("1", 1), new EnumValue("2", 2),
-                new EnumValue("3", 3));
-        assertTrue(getTypeSystem().getTypeNames().contains(typeName));
-        IDataType type = getTypeSystem().getDataType(EnumType.class, typeName);
-        Assert.assertNotNull(type);
-        Assert.assertEquals(type.getDescription(), typeDescription);
-
-        typeName = "trait_type";
-        typeDescription = typeName + description;
-        HierarchicalTypeDefinition<TraitType> trait = TypesUtil
-            .createTraitTypeDef(typeName, typeDescription, 
ImmutableSet.<String>of(),
-                TypesUtil.createRequiredAttrDef("type", 
DataTypes.STRING_TYPE));
-        getTypeSystem().defineTraitType(trait);
-        assertTrue(getTypeSystem().getTypeNames().contains(typeName));
-        type = getTypeSystem().getDataType(TraitType.class, typeName);
-        Assert.assertNotNull(type);
-        Assert.assertEquals(type.getDescription(), typeDescription);
-
-        typeName = "class_type";
-        typeDescription = typeName + description;
-        HierarchicalTypeDefinition<ClassType> classType = TypesUtil
-            .createClassTypeDef(typeName, typeDescription, 
ImmutableSet.<String>of(),
-                TypesUtil.createRequiredAttrDef("type", 
DataTypes.STRING_TYPE));
-        getTypeSystem().defineClassType(classType);
-        assertTrue(getTypeSystem().getTypeNames().contains(typeName));
-        type = getTypeSystem().getDataType(ClassType.class, typeName);
-        Assert.assertNotNull(type);
-        Assert.assertEquals(type.getDescription(), typeDescription);
-
-        typeName = "struct_type";
-        typeDescription = typeName + description;
-        getTypeSystem().defineStructType(typeName, typeDescription, true, 
createRequiredAttrDef("a", DataTypes.INT_TYPE));
-        assertTrue(getTypeSystem().getTypeNames().contains(typeName));
-        type = getTypeSystem().getDataType(StructType.class, typeName);
-        Assert.assertNotNull(type);
-        Assert.assertEquals(type.getDescription(), typeDescription);
-        
-    }
-
-    @Test
-    public void testIsRegistered() throws Exception {
-        getTypeSystem().defineEnumType("enum_test", new EnumValue("0", 0), new 
EnumValue("1", 1), new EnumValue("2", 2),
-                new EnumValue("3", 3));
-        assertTrue(getTypeSystem().isRegistered("enum_test"));
-    }
-
-    @Test
-    public void testGetTraitsNames() throws Exception {
-        HierarchicalTypeDefinition<TraitType> classificationTraitDefinition = 
TypesUtil
-                .createTraitTypeDef("Classification", 
ImmutableSet.<String>of(),
-                        TypesUtil.createRequiredAttrDef("tag", 
DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<TraitType> piiTrait =
-                TypesUtil.createTraitTypeDef("PII", ImmutableSet.<String>of());
-        HierarchicalTypeDefinition<TraitType> phiTrait =
-                TypesUtil.createTraitTypeDef("PHI", ImmutableSet.<String>of());
-        HierarchicalTypeDefinition<TraitType> pciTrait =
-                TypesUtil.createTraitTypeDef("PCI", ImmutableSet.<String>of());
-        HierarchicalTypeDefinition<TraitType> soxTrait =
-                TypesUtil.createTraitTypeDef("SOX", ImmutableSet.<String>of());
-        HierarchicalTypeDefinition<TraitType> secTrait =
-                TypesUtil.createTraitTypeDef("SEC", ImmutableSet.<String>of());
-        HierarchicalTypeDefinition<TraitType> financeTrait =
-                TypesUtil.createTraitTypeDef("Finance", 
ImmutableSet.<String>of());
-
-        getTypeSystem().defineTypes(ImmutableList.<EnumTypeDefinition>of(),
-                ImmutableList.<StructTypeDefinition>of(),
-                ImmutableList.of(classificationTraitDefinition, piiTrait, 
phiTrait, pciTrait, soxTrait, secTrait,
-                        financeTrait), 
ImmutableList.<HierarchicalTypeDefinition<ClassType>>of());
-
-        final ImmutableList<String> traitsNames = 
getTypeSystem().getTypeNamesByCategory(DataTypes.TypeCategory.TRAIT);
-        Assert.assertEquals(traitsNames.size(), 7);
-        List traits = Arrays.asList(new String[]{"Classification", "PII", 
"PHI", "PCI", "SOX", "SEC", "Finance",});
-
-        Assert.assertFalse(Collections.disjoint(traitsNames, traits));
-    }
-
-    private String random() {
-        return RandomStringUtils.random(10);
-    }
-
-    @Test
-    public void testUTFNames() throws Exception {
-        TypeSystem ts = getTypeSystem();
-
-        String enumType = random();
-        EnumTypeDefinition orgLevelEnum =
-                new EnumTypeDefinition(enumType, new EnumValue(random(), 1), 
new EnumValue(random(), 2));
-
-        String structName = random();
-        String attrType = random();
-        StructTypeDefinition structType =
-                createStructTypeDef(structName, 
createRequiredAttrDef(attrType, DataTypes.STRING_TYPE));
-
-        String className = random();
-        HierarchicalTypeDefinition<ClassType> classType = 
createClassTypeDef(className, ImmutableSet.<String>of(),
-                createRequiredAttrDef(attrType, DataTypes.STRING_TYPE));
-
-        String traitName = random();
-        HierarchicalTypeDefinition<TraitType> traitType = 
createTraitTypeDef(traitName, ImmutableSet.<String>of(),
-                createRequiredAttrDef(attrType, DataTypes.INT_TYPE));
-
-        ts.defineTypes(ImmutableList.of(orgLevelEnum), 
ImmutableList.of(structType),
-                ImmutableList.of(traitType), ImmutableList.of(classType));
-    }
-
-    @Test
-    public void testTypeCategory() throws AtlasException {
-        TypeSystem ts = getTypeSystem();
-        ts.reset();
-
-        StructTypeDefinition struct_A = createStructTypeDef("struct_A", 
createRequiredAttrDef("s_A", DataTypes.STRING_TYPE));
-        StructTypeDefinition struct_B = createStructTypeDef("struct_B", 
createRequiredAttrDef("s_B", DataTypes.STRING_TYPE));
-
-        HierarchicalTypeDefinition<TraitType> trait_A = 
createTraitTypeDef("trait_A", null,
-                createRequiredAttrDef("t_A", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<TraitType> trait_B = 
createTraitTypeDef("trait_B", ImmutableSet.of("trait_A"),
-                createRequiredAttrDef("t_B", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<TraitType> trait_C = 
createTraitTypeDef("trait_C", ImmutableSet.of("trait_A"),
-                createRequiredAttrDef("t_C", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<TraitType> trait_D = 
createTraitTypeDef("trait_D", ImmutableSet.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", ImmutableSet.of("class_A"),
-                createRequiredAttrDef("c_B", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<ClassType> class_C = 
createClassTypeDef("class_C", ImmutableSet.of("class_B"),
-                createRequiredAttrDef("c_C", DataTypes.STRING_TYPE));
-
-        ts.defineTypes(ImmutableList.<EnumTypeDefinition>of(), 
ImmutableList.of(struct_A, struct_B),
-                ImmutableList.of(trait_A, trait_B, trait_C, trait_D),
-                ImmutableList.of(class_A, class_B, class_C));
-
-        final ImmutableList<String> structNames = 
ts.getTypeNamesByCategory(DataTypes.TypeCategory.STRUCT);
-        final ImmutableList<String> traitNames = 
ts.getTypeNamesByCategory(DataTypes.TypeCategory.TRAIT);
-        final ImmutableList<String> classNames = 
ts.getTypeNamesByCategory(DataTypes.TypeCategory.CLASS);
-
-        Assert.assertEquals(structNames.size(), 2);
-        Assert.assertEquals(traitNames.size(), 4);
-        Assert.assertEquals(classNames.size(), 3);
-    }
-
-    @Test
-    public void testTypeNamesAreNotDuplicated() throws Exception {
-        TypeSystem typeSystem = getTypeSystem();
-        ImmutableList<String> traitNames = 
typeSystem.getTypeNamesByCategory(DataTypes.TypeCategory.TRAIT);
-        int numTraits = traitNames.size();
-
-        HashMap<String, IDataType> typesAdded = new HashMap<>();
-        String traitName = "dup_type_test" + random();
-        TraitType traitType = new TraitType(typeSystem, traitName, null, null, 
0);
-        typesAdded.put(traitName, traitType);
-        typeSystem.commitTypes(typesAdded);
-
-        traitNames = 
typeSystem.getTypeNamesByCategory(DataTypes.TypeCategory.TRAIT);
-        Assert.assertEquals(traitNames.size(), numTraits+1);
-
-        // add again with another trait this time
-        traitName = "dup_type_test" + random();
-        TraitType traitTypeNew = new TraitType(typeSystem, traitName, null, 
null, 0);
-        typesAdded.put(traitName, traitTypeNew);
-
-        typeSystem.commitTypes(typesAdded);
-        traitNames = 
typeSystem.getTypeNamesByCategory(DataTypes.TypeCategory.TRAIT);
-        Assert.assertEquals(traitNames.size(), numTraits+2);
-    }
-
-    @Test
-    public void testHierarchy() throws Exception {
-        HierarchicalTypeDefinition<ClassType> testObjectDef = 
TypesUtil.createClassTypeDef("TestObject", ImmutableSet.<String>of(),
-            createOptionalAttrDef("name", DataTypes.STRING_TYPE),
-            createOptionalAttrDef("description", DataTypes.STRING_TYPE),
-            createOptionalAttrDef("topAttribute", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<ClassType> testDataSetDef = 
TypesUtil.createClassTypeDef("TestDataSet", ImmutableSet.of("TestObject"));
-        HierarchicalTypeDefinition<ClassType> testColumnDef = 
TypesUtil.createClassTypeDef("TestColumn", ImmutableSet.of("TestObject"),
-            createRequiredAttrDef("name", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<ClassType> testRelationalDataSetDef = 
-            TypesUtil.createClassTypeDef("TestRelationalDataSet", 
ImmutableSet.of("TestDataSet"),
-                new AttributeDefinition("columns", 
DataTypes.arrayTypeName("TestColumn"),
-                    Multiplicity.OPTIONAL, true, null));
-        HierarchicalTypeDefinition<ClassType> testTableDef = 
TypesUtil.createClassTypeDef("TestTable", 
ImmutableSet.of("TestRelationalDataSet"),
-            createOptionalAttrDef("schema", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<ClassType> testDataFileDef = 
TypesUtil.createClassTypeDef("TestDataFile", 
ImmutableSet.of("TestRelationalDataSet"),
-            createOptionalAttrDef("urlString", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<ClassType> testDocumentDef = 
TypesUtil.createClassTypeDef("TestDocument", ImmutableSet.of("TestDataSet"),
-            createOptionalAttrDef("urlString", DataTypes.STRING_TYPE),
-            createOptionalAttrDef("encoding", DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<ClassType> testAnnotationDef 
=TypesUtil.createClassTypeDef("TestAnnotation",  ImmutableSet.<String>of(),
-            createOptionalAttrDef("inheritedAttribute", 
DataTypes.STRING_TYPE));
-        HierarchicalTypeDefinition<ClassType> myNewAnnotationDef = 
TypesUtil.createClassTypeDef("MyNewAnnotation", 
ImmutableSet.of("TestAnnotation"),
-            createRequiredAttrDef("myNewAnnotationAttribute", 
DataTypes.STRING_TYPE));
-        getTypeSystem().defineTypes(ImmutableList.<EnumTypeDefinition>of(), 
ImmutableList.<StructTypeDefinition>of(),
-            ImmutableList.<HierarchicalTypeDefinition<TraitType>>of(),
-            ImmutableList.of(testObjectDef, testDataSetDef, testColumnDef, 
testRelationalDataSetDef, testTableDef, testDataFileDef, testDocumentDef, 
testAnnotationDef, myNewAnnotationDef));
-
-        // Verify that field mappings for MyNewAnnotation contains the 
attribute inherited from the TestAnnotation superclass.
-        // Prior to fix for ATLAS-573, the inherited attribute was missing.
-        ClassType dataType = getTypeSystem().getDataType(ClassType.class, 
"MyNewAnnotation");
-        
Assert.assertTrue(dataType.fieldMapping.fields.containsKey("inheritedAttribute"));
-    }
-
-    @Test
-    public void testRedefineExistingType() throws Exception {
-        TypeSystem typeSystem = getTypeSystem();
-        HierarchicalTypeDefinition<TraitType> trait = TypesUtil
-                .createTraitTypeDef(random(), "description", 
ImmutableSet.<String>of(),
-                        TypesUtil.createRequiredAttrDef("type", 
DataTypes.STRING_TYPE));
-        typeSystem.defineTraitType(trait);
-
-        try {
-            typeSystem.defineTraitType(trait);
-            fail("Expected TypeExistsException");
-        } catch(TypeExistsException e) {
-            //expected
-        }
-    }
-
-    @Test
-    public void testDuplicateNewTypenames() throws Exception {
-        TypeSystem typeSystem = getTypeSystem();
-        HierarchicalTypeDefinition<TraitType> trait1 = TypesUtil
-                .createTraitTypeDef(random(), "description", 
ImmutableSet.<String>of(),
-                        TypesUtil.createRequiredAttrDef("type", 
DataTypes.STRING_TYPE));
-        // create another trait with the same name
-        HierarchicalTypeDefinition<TraitType> trait2 = TypesUtil
-                .createTraitTypeDef(trait1.typeName, "description", 
ImmutableSet.<String>of(),
-                        TypesUtil.createRequiredAttrDef("type", 
DataTypes.STRING_TYPE));
-
-        try {
-            typeSystem.defineTypes(ImmutableList.<EnumTypeDefinition>of(), 
ImmutableList.<StructTypeDefinition>of(),
-                    ImmutableList.of(trait1, trait2), 
ImmutableList.<HierarchicalTypeDefinition<ClassType>>of());
-        } catch(AtlasException e) {
-            fail("Exception unexpected");
-        }
-    }
-
-    @Test(expectedExceptions = ValueConversionException.class)
-    public void testConvertInvalidDate() throws Exception {
-       DataTypes.DATE_TYPE.convert("", Multiplicity.OPTIONAL);
-    }
-
-    @Test()
-    public void testConvertValidDate() throws Exception {
-        Date date = DataTypes.DATE_TYPE.convert(TEST_DATE_STRING, 
Multiplicity.OPTIONAL);
-        Assert.assertEquals(date, new Date(TEST_DATE_IN_LONG));
-
-
-        StringBuilder buf = new StringBuilder();
-        DataTypes.DATE_TYPE.output(new Date(TEST_DATE_IN_LONG), buf, "", new 
HashSet<Date>());
-        Assert.assertEquals(buf.toString(), TEST_DATE_STRING);
-    }
-}

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeUpdateBaseTest.java
----------------------------------------------------------------------
diff --git 
a/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeUpdateBaseTest.java
 
b/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeUpdateBaseTest.java
deleted file mode 100644
index 4a6ed2d..0000000
--- 
a/typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeUpdateBaseTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.apache.atlas.typesystem.types;
-
-import org.apache.atlas.typesystem.TypesDef;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
-import org.testng.Assert;
-
-public abstract class TypeUpdateBaseTest extends BaseTest {
-    protected void testTypeUpdateForAttributes() throws Exception {
-        StructTypeDefinition typeDefinition =
-                getTypeDefinition(newName(), 
TypesUtil.createRequiredAttrDef("a", DataTypes.INT_TYPE));
-        TypeSystem ts = getTypeSystem();
-        TypesDef typesDef = getTypesDef(typeDefinition);
-        ts.defineTypes(typesDef);
-        String typeName = typeDefinition.typeName;
-
-        //Allow modifying required to optional attribute
-        typeDefinition = getTypeDefinition(typeName, 
TypesUtil.createOptionalAttrDef("a", DataTypes.INT_TYPE));
-        ts.updateTypes(getTypesDef(typeDefinition));
-
-        //Allow adding new optional attribute
-        typeDefinition = getTypeDefinition(typeName, 
TypesUtil.createOptionalAttrDef("a", DataTypes.INT_TYPE),
-                TypesUtil.createOptionalAttrDef("b", DataTypes.INT_TYPE));
-        ts.updateTypes(getTypesDef(typeDefinition));
-
-        //Don't allow adding required attribute
-        typeDefinition = getTypeDefinition(typeName, 
TypesUtil.createOptionalAttrDef("a", DataTypes.INT_TYPE),
-                TypesUtil.createOptionalAttrDef("b", DataTypes.INT_TYPE),
-                TypesUtil.createRequiredAttrDef("c", DataTypes.INT_TYPE));
-        try {
-            ts.updateTypes(getTypesDef(typeDefinition));
-            Assert.fail("Expected TypeUpdateException");
-        } catch (TypeUpdateException e) {
-            //assert that type is not updated when validation fails
-            Assert.assertEquals(getNumberOfFields(ts, 
typeDefinition.typeName), 2);
-        }
-
-        //Don't allow removing attribute
-        typeDefinition = getTypeDefinition(typeName, 
TypesUtil.createOptionalAttrDef("a", DataTypes.INT_TYPE));
-        try {
-            ts.updateTypes(getTypesDef(typeDefinition));
-        } catch (TypeUpdateException e) {
-            //expected
-        }
-
-        //Don't allow modifying other fields of attribute definition - 
optional to required
-        typeDefinition = getTypeDefinition(typeName, 
TypesUtil.createOptionalAttrDef("a", DataTypes.INT_TYPE),
-                TypesUtil.createRequiredAttrDef("b", DataTypes.INT_TYPE));
-        try {
-            ts.updateTypes(getTypesDef(typeDefinition));
-        } catch (TypeUpdateException e) {
-            //expected
-        }
-
-        //Don't allow modifying other fields of attribute definition - 
attribute type change
-        typeDefinition = getTypeDefinition(typeName, 
TypesUtil.createOptionalAttrDef("a", DataTypes.INT_TYPE),
-                TypesUtil.createOptionalAttrDef("b", DataTypes.STRING_TYPE));
-        try {
-            ts.updateTypes(getTypesDef(typeDefinition));
-        } catch (TypeUpdateException e) {
-            //expected
-        }
-
-        //Don't allow modifying other fields of attribute definition - 
attribute type change
-        typeDefinition = getTypeDefinition(typeName, 
TypesUtil.createRequiredAttrDef("a", DataTypes.INT_TYPE),
-                new AttributeDefinition("b", 
DataTypes.arrayTypeName(DataTypes.STRING_TYPE.getName()),
-                        Multiplicity.COLLECTION, false, null));
-        try {
-            ts.updateTypes(getTypesDef(typeDefinition));
-        } catch (TypeUpdateException e) {
-            //expected
-        }
-    }
-
-    protected abstract int getNumberOfFields(TypeSystem ts, String typeName) 
throws Exception;
-
-    protected abstract TypesDef getTypesDef(StructTypeDefinition 
typeDefinition);
-
-    protected abstract StructTypeDefinition getTypeDefinition(String typeName,
-                                                              
AttributeDefinition... attributeDefinitions);
-}

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/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
deleted file mode 100644
index 1a86cf3..0000000
--- 
a/typesystem/src/test/java/org/apache/atlas/typesystem/types/ValidationTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.atlas.typesystem.types;
-
-import com.google.common.collect.ImmutableSet;
-
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-public class ValidationTest {
-    @DataProvider(name = "attributeData")
-    private Object[][] createAttributeData() {
-        return new String[][]{{null, "type"}, {"", "type"}, {"name", null}, 
{"name", ""}};
-    }
-
-    @Test(dataProvider = "attributeData", expectedExceptions = 
{IllegalArgumentException.class})
-    public void testAttributes(String name, String type) {
-        TypesUtil.createRequiredAttrDef(name, type);
-    }
-
-    @DataProvider(name = "enumValueData")
-    private Object[][] createEnumValueData() {
-        return new String[][]{{null}, {""}};
-    }
-
-    @Test(dataProvider = "enumValueData", expectedExceptions = 
{IllegalArgumentException.class})
-    public void testEnumValue(String name) {
-        new EnumValue(name, 1);
-    }
-
-    @DataProvider(name = "enumTypeData")
-    private Object[][] createEnumTypeData() {
-        EnumValue value = new EnumValue("name", 1);
-        return new Object[][]{{null, value}, {"", value}, {"name"}};
-    }
-
-    @Test(dataProvider = "enumTypeData", expectedExceptions = 
{IllegalArgumentException.class})
-    public void testEnumType(String name, EnumValue... values) {
-        new EnumTypeDefinition(name, values);
-    }
-
-    @DataProvider(name = "structTypeData")
-    private Object[][] createStructTypeData() {
-        AttributeDefinition value = TypesUtil.createRequiredAttrDef("name", 
"type");
-        return new Object[][]{{null, value}, {"", value}, {"name"}};
-    }
-
-    @Test(dataProvider = "structTypeData", expectedExceptions = 
{IllegalArgumentException.class})
-    public void testStructType(String name, AttributeDefinition... values) {
-        new StructTypeDefinition(name, values);
-    }
-
-    @DataProvider(name = "classTypeData")
-    private Object[][] createClassTypeData() {
-        return new Object[][]{{null}, {""}};
-    }
-
-    @Test(dataProvider = "classTypeData", expectedExceptions = 
{IllegalArgumentException.class})
-    public void testClassType(String name) {
-        AttributeDefinition value = TypesUtil.createRequiredAttrDef("name", 
"type");
-        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, ImmutableSet.of("super"), value);
-    }
-
-    @Test
-    public void testValidTypes() {
-        AttributeDefinition attribute = 
TypesUtil.createRequiredAttrDef("name", "type");
-
-        //class with no attributes
-        TypesUtil.createClassTypeDef("name", ImmutableSet.of("super"));
-
-        //class with no super types
-        TypesUtil.createClassTypeDef("name", ImmutableSet.<String>of(), 
attribute);
-
-        //trait with no attributes
-        TypesUtil.createTraitTypeDef("name", ImmutableSet.of("super"));
-
-        //trait with no super types
-        TypesUtil.createTraitTypeDef("name", ImmutableSet.<String>of(), 
attribute);
-    }
-}

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/typesystem/src/test/java/org/apache/atlas/typesystem/types/cache/DefaultTypeCacheTest.java
----------------------------------------------------------------------
diff --git 
a/typesystem/src/test/java/org/apache/atlas/typesystem/types/cache/DefaultTypeCacheTest.java
 
b/typesystem/src/test/java/org/apache/atlas/typesystem/types/cache/DefaultTypeCacheTest.java
deleted file mode 100644
index 5c397dd..0000000
--- 
a/typesystem/src/test/java/org/apache/atlas/typesystem/types/cache/DefaultTypeCacheTest.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.apache.atlas.typesystem.types.cache;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-import org.apache.atlas.AtlasException;
-import org.apache.atlas.typesystem.types.ClassType;
-import org.apache.atlas.typesystem.types.DataTypes;
-import org.apache.atlas.typesystem.types.DataTypes.TypeCategory;
-import org.apache.atlas.typesystem.types.EnumType;
-import org.apache.atlas.typesystem.types.EnumValue;
-import org.apache.atlas.typesystem.types.IDataType;
-import org.apache.atlas.typesystem.types.StructType;
-import org.apache.atlas.typesystem.types.TraitType;
-import org.apache.atlas.typesystem.types.TypeSystem;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-
-/**
- * Tests functional behavior of {@link DefaultTypeCache}
- */
-@SuppressWarnings("rawtypes")
-public class DefaultTypeCacheTest {
-
-    private String CLASSTYPE_CUSTOMER = "Customer";
-    private String STRUCTTYPE_ADDRESS = "Address";
-    private String TRAITTYPE_PRIVILEGED = "Privileged";
-    private String ENUMTYPE_SHIPPING = "Shipping";
-
-    private String UNKNOWN_TYPE = "UndefinedType";
-
-    private ClassType customerType;
-    private StructType addressType;
-    private TraitType privilegedTrait;
-    private EnumType shippingEnum;
-
-    private DefaultTypeCache cache;
-
-    @BeforeClass
-    public void onetimeSetup() throws Exception {
-
-        // init TypeSystem
-        TypeSystem ts = TypeSystem.getInstance().reset();
-
-        // Customer ClassType
-        customerType = ts.defineClassType(TypesUtil
-            .createClassTypeDef(CLASSTYPE_CUSTOMER, ImmutableSet.<String>of(),
-                TypesUtil.createRequiredAttrDef("name", DataTypes.STRING_TYPE),
-                TypesUtil.createRequiredAttrDef("id", DataTypes.LONG_TYPE)));
-
-        // Address StructType
-        addressType = ts.defineStructType(STRUCTTYPE_ADDRESS, true,
-                TypesUtil.createRequiredAttrDef("first line", 
DataTypes.STRING_TYPE),
-                TypesUtil.createOptionalAttrDef("second line", 
DataTypes.STRING_TYPE),
-                TypesUtil.createRequiredAttrDef("city", DataTypes.STRING_TYPE),
-                TypesUtil.createRequiredAttrDef("pincode", 
DataTypes.INT_TYPE));
-
-        // Privileged TraitType
-        privilegedTrait = ts.defineTraitType(TypesUtil
-                .createTraitTypeDef(TRAITTYPE_PRIVILEGED, 
ImmutableSet.<String>of(),
-                        TypesUtil.createRequiredAttrDef("category", 
DataTypes.INT_TYPE)));
-
-        // Shipping EnumType
-        shippingEnum = 
ts.defineEnumType(TypesUtil.createEnumTypeDef(ENUMTYPE_SHIPPING,
-            new EnumValue("Domestic", 1), new EnumValue("International", 2)));
-    }
-
-    @BeforeMethod
-    public void eachTestSetup() throws Exception {
-
-        cache = new DefaultTypeCache();
-
-        cache.put(customerType);
-        cache.put(addressType);
-        cache.put(privilegedTrait);
-        cache.put(shippingEnum);
-    }
-
-    @Test
-    public void testCacheGetType() throws Exception {
-
-        IDataType custType = cache.get(CLASSTYPE_CUSTOMER);
-        verifyType(custType, CLASSTYPE_CUSTOMER, ClassType.class);
-
-        IDataType addrType = cache.get(STRUCTTYPE_ADDRESS);
-        verifyType(addrType, STRUCTTYPE_ADDRESS, StructType.class);
-
-        IDataType privTrait = cache.get(TRAITTYPE_PRIVILEGED);
-        verifyType(privTrait, TRAITTYPE_PRIVILEGED, TraitType.class);
-
-        IDataType shippingEnum = cache.get(ENUMTYPE_SHIPPING);
-        verifyType(shippingEnum, ENUMTYPE_SHIPPING, EnumType.class);
-
-        assertNull(cache.get(UNKNOWN_TYPE));
-    }
-
-    @Test
-    public void testCacheGetTypeByCategory() throws Exception {
-
-        IDataType custType = cache.get(TypeCategory.CLASS, CLASSTYPE_CUSTOMER);
-        verifyType(custType, CLASSTYPE_CUSTOMER, ClassType.class);
-
-        IDataType addrType = cache.get(TypeCategory.STRUCT, 
STRUCTTYPE_ADDRESS);
-        verifyType(addrType, STRUCTTYPE_ADDRESS, StructType.class);
-
-        IDataType privTrait = cache.get(TypeCategory.TRAIT, 
TRAITTYPE_PRIVILEGED);
-        verifyType(privTrait, TRAITTYPE_PRIVILEGED, TraitType.class);
-
-        IDataType shippingEnum = cache.get(TypeCategory.ENUM, 
ENUMTYPE_SHIPPING);
-        verifyType(shippingEnum, ENUMTYPE_SHIPPING, EnumType.class);
-
-        assertNull(cache.get(UNKNOWN_TYPE));
-    }
-
-    private void verifyType(IDataType actualType, String expectedName, Class<? 
extends IDataType> typeClass) {
-
-        assertNotNull(actualType, "The " + expectedName + " type not in 
cache");
-        assertTrue(typeClass.isInstance(actualType));
-        assertEquals(actualType.getName(), expectedName, "The type name does 
not match");
-    }
-
-    @Test
-    public void testCacheHasType() throws Exception {
-
-        assertTrue(cache.has(CLASSTYPE_CUSTOMER));
-        assertTrue(cache.has(STRUCTTYPE_ADDRESS));
-        assertTrue(cache.has(TRAITTYPE_PRIVILEGED));
-        assertTrue(cache.has(ENUMTYPE_SHIPPING));
-
-        assertFalse(cache.has(UNKNOWN_TYPE));
-    }
-
-    @Test
-    public void testCacheHasTypeByCategory() throws Exception {
-
-        assertTrue(cache.has(TypeCategory.CLASS, CLASSTYPE_CUSTOMER));
-        assertTrue(cache.has(TypeCategory.STRUCT, STRUCTTYPE_ADDRESS));
-        assertTrue(cache.has(TypeCategory.TRAIT, TRAITTYPE_PRIVILEGED));
-        assertTrue(cache.has(TypeCategory.ENUM, ENUMTYPE_SHIPPING));
-
-        assertFalse(cache.has(UNKNOWN_TYPE));
-    }
-
-    @Test
-    public void testCacheGetAllTypeNames() throws Exception {
-
-        List<String> allTypeNames = new ArrayList<>(cache.getAllTypeNames());
-        Collections.sort(allTypeNames);
-
-        final int EXPECTED_TYPE_COUNT = 4;
-        assertEquals(allTypeNames.size(), EXPECTED_TYPE_COUNT, "Total number 
of types does not match.");
-
-        assertEquals(STRUCTTYPE_ADDRESS, allTypeNames.get(0));
-        assertEquals(CLASSTYPE_CUSTOMER, allTypeNames.get(1));
-        assertEquals(TRAITTYPE_PRIVILEGED, allTypeNames.get(2));
-        assertEquals(ENUMTYPE_SHIPPING, allTypeNames.get(3));
-    }
-
-    private Collection<String> getTypeNamesByCategory(final TypeCategory 
category)
-            throws AtlasException {
-        return cache.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, String>() 
{{
-            put(TypeCache.TYPE_FILTER.CATEGORY, category.name());
-        }});
-    }
-
-    @Test
-    public void testCacheGetTypeNamesByCategory() throws Exception {
-        List<String> classTypes = new 
ArrayList(getTypeNamesByCategory(TypeCategory.CLASS));
-        final int EXPECTED_CLASSTYPE_COUNT = 1;
-        assertEquals(classTypes.size(), EXPECTED_CLASSTYPE_COUNT);
-        assertEquals(CLASSTYPE_CUSTOMER, classTypes.get(0));
-
-        List<String> structTypes = new 
ArrayList(getTypeNamesByCategory(TypeCategory.STRUCT));
-        final int EXPECTED_STRUCTTYPE_COUNT = 1;
-        assertEquals(structTypes.size(), EXPECTED_STRUCTTYPE_COUNT);
-        assertEquals(STRUCTTYPE_ADDRESS, structTypes.get(0));
-
-        List<String> traitTypes = new 
ArrayList(getTypeNamesByCategory(TypeCategory.TRAIT));
-        final int EXPECTED_TRAITTYPE_COUNT = 1;
-        assertEquals(traitTypes.size(), EXPECTED_TRAITTYPE_COUNT);
-        assertEquals(TRAITTYPE_PRIVILEGED, traitTypes.get(0));
-
-        List<String> enumTypes = new 
ArrayList(getTypeNamesByCategory(TypeCategory.ENUM));
-        final int EXPECTED_ENUMTYPE_COUNT = 1;
-        assertEquals(enumTypes.size(), EXPECTED_ENUMTYPE_COUNT);
-        assertEquals(ENUMTYPE_SHIPPING, enumTypes.get(0));
-    }
-
-    @Test
-    public void testCacheBulkInsert() throws Exception {
-
-        List<IDataType> allTypes = new ArrayList<>();
-        allTypes.add(customerType);
-        allTypes.add(addressType);
-        allTypes.add(privilegedTrait);
-        allTypes.add(shippingEnum);
-
-        // create a new cache instead of using the one setup for every method 
call
-        cache = new DefaultTypeCache();
-        cache.putAll(allTypes);
-
-        IDataType custType = cache.get(CLASSTYPE_CUSTOMER);
-        verifyType(custType, CLASSTYPE_CUSTOMER, ClassType.class);
-
-        IDataType addrType = cache.get(STRUCTTYPE_ADDRESS);
-        verifyType(addrType, STRUCTTYPE_ADDRESS, StructType.class);
-
-        IDataType privTrait = cache.get(TRAITTYPE_PRIVILEGED);
-        verifyType(privTrait, TRAITTYPE_PRIVILEGED, TraitType.class);
-
-        IDataType shippingEnum = cache.get(ENUMTYPE_SHIPPING);
-        verifyType(shippingEnum, ENUMTYPE_SHIPPING, EnumType.class);
-    }
-
-    @Test
-    public void testCacheRemove() throws Exception {
-        cache.remove(CLASSTYPE_CUSTOMER);
-        assertNull(cache.get(CLASSTYPE_CUSTOMER));
-        assertFalse(cache.has(CLASSTYPE_CUSTOMER));
-        assertTrue(getTypeNamesByCategory(TypeCategory.CLASS).isEmpty());
-
-        final int EXPECTED_TYPE_COUNT = 3;
-        assertEquals(cache.getAllTypeNames().size(), EXPECTED_TYPE_COUNT);
-    }
-
-    @Test
-    public void testCacheRemoveByCategory() throws Exception {
-
-        cache.remove(TypeCategory.CLASS, CLASSTYPE_CUSTOMER);
-        assertNull(cache.get(CLASSTYPE_CUSTOMER));
-        assertFalse(cache.has(CLASSTYPE_CUSTOMER));
-        assertTrue(getTypeNamesByCategory(TypeCategory.CLASS).isEmpty());
-
-        final int EXPECTED_TYPE_COUNT = 3;
-        assertEquals(cache.getAllTypeNames().size(), EXPECTED_TYPE_COUNT);
-    }
-
-    @Test
-    public void testCacheClear() throws Exception {
-
-        cache.clear();
-
-        assertNull(cache.get(CLASSTYPE_CUSTOMER));
-        assertFalse(cache.has(CLASSTYPE_CUSTOMER));
-
-        assertNull(cache.get(STRUCTTYPE_ADDRESS));
-        assertFalse(cache.has(STRUCTTYPE_ADDRESS));
-
-        assertNull(cache.get(TRAITTYPE_PRIVILEGED));
-        assertFalse(cache.has(TRAITTYPE_PRIVILEGED));
-
-        assertNull(cache.get(ENUMTYPE_SHIPPING));
-        assertFalse(cache.has(ENUMTYPE_SHIPPING));
-
-        assertTrue(getTypeNamesByCategory(TypeCategory.CLASS).isEmpty());
-        assertTrue(getTypeNamesByCategory(TypeCategory.STRUCT).isEmpty());
-        assertTrue(getTypeNamesByCategory(TypeCategory.TRAIT).isEmpty());
-        assertTrue(getTypeNamesByCategory(TypeCategory.ENUM).isEmpty());
-
-        assertTrue(cache.getAllTypeNames().isEmpty());
-    }
-
-    @Test(expectedExceptions = AtlasException.class)
-    public void testPutTypeWithNullType() throws Exception {
-
-        cache.put(null);
-        fail("Null type should be not allowed in 'put'");
-    }
-
-    @Test(expectedExceptions = AtlasException.class)
-    public void testPutTypeWithInvalidType() throws Exception {
-
-        cache.put(DataTypes.BOOLEAN_TYPE);
-        fail("type should only be an instance of ClassType | EnumType | 
StructType | TraitType in 'put'");
-    }
-
-    @Test(expectedExceptions = IllegalArgumentException.class)
-    public void testGetTypeWithNullCategory() throws Exception {
-
-        cache.get(null, CLASSTYPE_CUSTOMER);
-        fail("Null TypeCategory should be not allowed in 'get'");
-    }
-
-    @Test(expectedExceptions = IllegalArgumentException.class)
-    public void testGetTypeWithInvalidCategory() throws Exception {
-
-        cache.get(TypeCategory.PRIMITIVE, DataTypes.BOOLEAN_TYPE.getName());
-        fail("TypeCategory should only be one of TypeCategory.CLASS | ENUM | 
STRUCT | TRAIT in 'get'");
-    }
-
-    @Test(expectedExceptions = IllegalArgumentException.class)
-    public void testCacheHasTypeWithNullCategory() throws Exception {
-
-        cache.has(null, CLASSTYPE_CUSTOMER);
-        fail("Null TypeCategory should be not allowed in 'has'");
-    }
-
-    @Test(expectedExceptions = IllegalArgumentException.class)
-    public void testCacheHasTypeWithInvalidCategory() throws Exception {
-
-        cache.has(TypeCategory.PRIMITIVE, DataTypes.BOOLEAN_TYPE.getName());
-        fail("TypeCategory should only be one of TypeCategory.CLASS | ENUM | 
STRUCT | TRAIT in 'has'");
-    }
-
-    @Test(expectedExceptions = IllegalArgumentException.class)
-    public void testCacheGetTypeNamesByInvalidCategory() throws Exception {
-        getTypeNamesByCategory(TypeCategory.PRIMITIVE);
-        fail("TypeCategory should only be one of TypeCategory.CLASS | ENUM | 
STRUCT | TRAIT in 'getNames'");
-    }
-
-    @Test(expectedExceptions = AtlasException.class)
-    public void testCacheBulkInsertWithNullType() throws Exception {
-
-        List<IDataType> allTypes = new ArrayList<>();
-        allTypes.add(null);
-
-        // create a new cache instead of using the one setup for every method 
call
-        cache = new DefaultTypeCache();
-        cache.putAll(allTypes);
-
-        fail("Null type should be not allowed in 'putAll'");
-    }
-
-    @Test(expectedExceptions = AtlasException.class)
-    public void testCacheBulkInsertWithInvalidType() throws Exception {
-
-        List<IDataType> allTypes = new ArrayList<>();
-        allTypes.add(DataTypes.BOOLEAN_TYPE);
-
-        // create a new cache instead of using the one setup for every method 
call
-        cache = new DefaultTypeCache();
-        cache.putAll(allTypes);
-
-        fail("type should only one of ClassType | EnumType | StructType | 
TraitType in 'putAll'");
-    }
-
-    @Test(expectedExceptions = IllegalArgumentException.class)
-    public void testCacheRemoveByNullCategory() throws Exception {
-
-        cache.remove(null, CLASSTYPE_CUSTOMER);
-        fail("Null type should be not allowed in 'remove'");
-    }
-
-    @Test(expectedExceptions = IllegalArgumentException.class)
-    public void testCacheRemoveByInvalidCategory() throws Exception {
-
-        cache.remove(TypeCategory.PRIMITIVE, DataTypes.BOOLEAN_TYPE.getName());
-        fail("TypeCategory should only be one of TypeCategory.CLASS | ENUM | 
STRUCT | TRAIT in 'remove'");
-    }
-
-    @Test
-    public void testGetTypesByFilter() throws Exception {
-        // init TypeSystem
-        TypeSystem ts = TypeSystem.getInstance().reset();
-
-        ts.defineClassType(TypesUtil.createClassTypeDef("A", 
ImmutableSet.<String>of()));
-        ts.defineClassType(TypesUtil.createClassTypeDef("A1", 
ImmutableSet.of("A")));
-
-        ts.defineClassType(TypesUtil.createClassTypeDef("B", 
ImmutableSet.<String>of()));
-
-        ts.defineClassType(TypesUtil.createClassTypeDef("C", 
ImmutableSet.of("B", "A")));
-
-        //supertype ~ A
-        ImmutableList<String> results = ts.getTypeNames(new 
HashMap<TypeCache.TYPE_FILTER, String>() {{
-                    put(TypeCache.TYPE_FILTER.SUPERTYPE, "A");
-                }});
-        assertTrue(results.containsAll(Arrays.asList("A1", "C")), "Results: " 
+ results);
-
-        //!supertype doesn't return the type itself
-        results = ts.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, String>() 
{{
-            put(TypeCache.TYPE_FILTER.NOT_SUPERTYPE, "A");
-        }});
-        assertTrue(results.containsAll(Arrays.asList("B")), "Results: " + 
results);
-
-        //supertype ~ A && supertype !~ B
-        results = ts.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, String>() 
{{
-            put(TypeCache.TYPE_FILTER.SUPERTYPE, "A");
-            put(TypeCache.TYPE_FILTER.NOT_SUPERTYPE, "B");
-        }});
-        assertTrue(results.containsAll(Arrays.asList("A1")), "Results: " + 
results);
-
-        //none of category trait
-        results = ts.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, String>() 
{{
-            put(TypeCache.TYPE_FILTER.CATEGORY, TypeCategory.TRAIT.name());
-            put(TypeCache.TYPE_FILTER.SUPERTYPE, "A");
-        }});
-        assertTrue(results.isEmpty(), "Results: " + results);
-
-        //no filter returns all types
-        results = ts.getTypeNames(null);
-        assertTrue(results.containsAll(Arrays.asList("A", "A1", "B", "C")), 
"Results: " + results);
-
-        results = ts.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, 
String>());
-        assertTrue(results.containsAll(Arrays.asList("A", "A1", "B", "C")), 
"Results: " + results);
-
-        //invalid category
-        try {
-            ts.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, String>() {{
-                put(TypeCache.TYPE_FILTER.CATEGORY, "A");
-            }});
-            fail("Expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) {
-            //expected
-        }
-
-        //invalid supertype
-        results = ts.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, String>() 
{{
-            put(TypeCache.TYPE_FILTER.SUPERTYPE, "X");
-        }});
-        assertTrue(results.isEmpty(), "Expected empty result for non-existent 
type 'X'. Found: " + results);
-
-        //invalid supertype
-        results = ts.getTypeNames(new HashMap<TypeCache.TYPE_FILTER, String>() 
{{
-            put(TypeCache.TYPE_FILTER.NOT_SUPERTYPE, "X");
-        }});
-        assertTrue(results.containsAll(Arrays.asList("A", "A1", "B", "C")), 
"Results: " + results);
-    }
-}

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/typesystem/src/test/resources/atlas-application.properties
----------------------------------------------------------------------
diff --git a/typesystem/src/test/resources/atlas-application.properties 
b/typesystem/src/test/resources/atlas-application.properties
deleted file mode 100644
index b937c33..0000000
--- a/typesystem/src/test/resources/atlas-application.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you 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.
-#
-
-#system property
-atlas.data=${sys:user.dir}/target/data
-
-
-
-#re-use existing property
-atlas.graph.data=${atlas.data}/graph
-
-#plain property
-atlas.service=atlas
-
-#invalid system property
-atlas.db=${atlasdb}
-
-atlas.TypeSystem.impl=org.apache.atlas.typesystem.types.TypeSystem
-
-
-
-#########  Atlas Server Configs #########
-atlas.rest.address=http://localhost:31000
-
-#########  Graph Database Configs  #########
-
-
-# Graph database implementation.  Value inserted by maven.
-atlas.graphdb.backend=${graphdb.backend.impl}
-
-# Graph Storage
-atlas.graph.storage.backend=${graph.storage.backend}
-
-# Entity repository implementation
-atlas.EntityAuditRepository.impl=${entity.repository.impl}
-
-# Graph Search Index Backend
-atlas.graph.index.search.backend=${graph.index.backend}
-
-#Berkeley storage directory
-atlas.graph.storage.directory=${sys:atlas.data}/berkley
-
-#hbase
-#For standalone mode , specify localhost
-#for distributed mode, specify zookeeper quorum here - For more information 
refer 
http://s3.thinkaurelius.com/docs/titan/current/hbase.html#_remote_server_mode_2
-
-atlas.graph.storage.hostname=${graph.storage.hostname}
-atlas.graph.storage.hbase.regions-per-server=1
-atlas.graph.storage.lock.wait-time=10000
-
-#ElasticSearch
-atlas.graph.index.search.directory=${sys:atlas.data}/es
-atlas.graph.index.search.elasticsearch.client-only=false
-atlas.graph.index.search.elasticsearch.local-mode=true
-atlas.graph.index.search.elasticsearch.create.sleep=2000
-
-# Solr cloud mode properties
-atlas.graph.index.search.solr.mode=cloud
-atlas.graph.index.search.solr.zookeeper-url=${solr.zk.address}
-atlas.graph.index.search.max-result-set-size=150
-
-#########  Hive Lineage Configs  #########
-## Schema
-atlas.lineage.schema.query.hive_table=hive_table where __guid='%s'\, columns
-atlas.lineage.schema.query.hive_table_v1=hive_table_v1 where __guid='%s'\, 
columns
-
-#########  Notification Configs  #########
-atlas.notification.embedded=true
-
-atlas.kafka.zookeeper.connect=localhost:19026
-atlas.kafka.bootstrap.servers=localhost:19027
-atlas.kafka.data=${sys:atlas.data}/kafka
-atlas.kafka.zookeeper.session.timeout.ms=4000
-atlas.kafka.zookeeper.sync.time.ms=20
-atlas.kafka.consumer.timeout.ms=4000
-atlas.kafka.auto.commit.interval.ms=100
-atlas.kafka.hook.group.id=atlas
-atlas.kafka.entities.group.id=atlas_entities
-#atlas.kafka.auto.commit.enable=false
-
-atlas.kafka.enable.auto.commit=false
-atlas.kafka.auto.offset.reset=earliest
-atlas.kafka.session.timeout.ms=30000
-
-
-
-#########  Entity Audit Configs  #########
-atlas.audit.hbase.tablename=ATLAS_ENTITY_AUDIT_EVENTS
-atlas.audit.zookeeper.session.timeout.ms=1000
-atlas.audit.hbase.zookeeper.quorum=localhost
-atlas.audit.hbase.zookeeper.property.clientPort=19026
-
-#########  Security Properties  #########
-
-# SSL config
-atlas.enableTLS=false
-atlas.server.https.port=31443
-
-#########  Security Properties  #########
-
-hbase.security.authentication=simple
-
-atlas.hook.falcon.synchronous=true
-
-#########  JAAS Configuration ########
-
-atlas.jaas.KafkaClient.loginModuleName = 
com.sun.security.auth.module.Krb5LoginModule
-atlas.jaas.KafkaClient.loginModuleControlFlag = required
-atlas.jaas.KafkaClient.option.useKeyTab = true
-atlas.jaas.KafkaClient.option.storeKey = true
-atlas.jaas.KafkaClient.option.serviceName = kafka
-atlas.jaas.KafkaClient.option.keyTab = 
/etc/security/keytabs/atlas.service.keytab
-atlas.jaas.KafkaClient.option.principal = atlas/_h...@example.com
-
-#########  High Availability Configuration ########
-atlas.server.ha.enabled=false
-#atlas.server.ids=id1
-#atlas.server.address.id1=localhost:21000
-
-#########POLICY FILE PATH #########
-# atlas.auth.policy.file=policy-store.txt
-
-atlas.authentication.method.file=true
-atlas.authentication.method.ldap.type=none
-# atlas.authentication.method.file.filename=users-credentials.properties
-atlas.authentication.method.kerberos=false
-
-#########  Gremlin Search Configuration  #########
-# Set to false to disable gremlin search.
-atlas.search.gremlin.enable=true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/typesystem/src/test/resources/policy-store.txt
----------------------------------------------------------------------
diff --git a/typesystem/src/test/resources/policy-store.txt 
b/typesystem/src/test/resources/policy-store.txt
deleted file mode 100644
index 048affe..0000000
--- a/typesystem/src/test/resources/policy-store.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-##Policy Format
-##r-READ, w-WRITE, u-UPDATE, d-DELETE
-##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name
-##
-adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:*
-dataScientistPolicy;;;;DATA_SCIENTIST:r;;type:*,entity:*
-dataStewardPolicy;;;;DATA_STEWARD:rwu;;type:*,entity:*
-hadoopPolicy;;;;hadoop:rwud;;type:*,entity:*,operation:*
-rangerTagSyncPolicy;;;;RANGER_TAG_SYNC:r;;type:*,entity:*

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/typesystem/src/test/resources/sampleInstance.json
----------------------------------------------------------------------
diff --git a/typesystem/src/test/resources/sampleInstance.json 
b/typesystem/src/test/resources/sampleInstance.json
deleted file mode 100755
index efcc48d..0000000
--- a/typesystem/src/test/resources/sampleInstance.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
-  "$typeName$": "Department",
-  "$id$": {
-    "id": -1420494283853484000,
-    "$typeName$": "Department",
-    "version": 0
-  },
-  "employees": [
-    {
-      "$typeName$": "Person",
-      "$id$": {
-        "id": -1420494283853508000,
-        "$typeName$": "Person",
-        "version": 0
-      },
-      "manager": {
-        "id": -1420494283853511000,
-        "$typeName$": "Manager",
-        "version": 0
-      },
-      "department": {
-        "id": -1420494283853484000,
-        "$typeName$": "Department",
-        "version": 0
-      },
-      "name": "John"
-    },
-    {
-      "$typeName$": "Manager",
-      "$id$": {
-        "id": -1420494283853511000,
-        "$typeName$": "Manager",
-        "version": 0
-      },
-      "manager": null,
-      "subordinates": [
-        {
-          "$typeName$": "Person",
-          "$id$": {
-            "id": -1420494283853508000,
-            "$typeName$": "Person",
-            "version": 0
-          },
-          "manager": {
-            "id": -1420494283853511000,
-            "$typeName$": "Manager",
-            "version": 0
-          },
-          "department": {
-            "id": -1420494283853484000,
-            "$typeName$": "Department",
-            "version": 0
-          },
-          "name": "John"
-        }
-      ],
-      "department": {
-        "id": -1420494283853484000,
-        "$typeName$": "Department",
-        "version": 0
-      },
-      "name": "Jane",
-      "$traits$": {
-        "SecurityClearance": {
-          "$typeName$": "SecurityClearance",
-          "level": 1
-        }
-      }
-    }
-  ],
-  "name": "hr"
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/typesystem/src/test/resources/sampleTypes.json
----------------------------------------------------------------------
diff --git a/typesystem/src/test/resources/sampleTypes.json 
b/typesystem/src/test/resources/sampleTypes.json
deleted file mode 100755
index d0ac311..0000000
--- a/typesystem/src/test/resources/sampleTypes.json
+++ /dev/null
@@ -1,633 +0,0 @@
-{
-  "enumTypes": [
-    {
-      "name": "HiveObjectType",
-      "enumValues": [
-        {
-          "value": "GLOBAL",
-          "ordinal": 1
-        },
-        {
-          "value": "DATABASE",
-          "ordinal": 2
-        },
-        {
-          "value": "TABLE",
-          "ordinal": 3
-        },
-        {
-          "value": "PARTITION",
-          "ordinal": 4
-        },
-        {
-          "value": "COLUMN",
-          "ordinal": 5
-        }
-      ]
-    },
-    {
-      "name": "LockLevel",
-      "enumValues": [
-        {
-          "value": "DB",
-          "ordinal": 1
-        },
-        {
-          "value": "TABLE",
-          "ordinal": 2
-        },
-        {
-          "value": "PARTITION",
-          "ordinal": 3
-        }
-      ]
-    },
-    {
-      "name": "TxnState",
-      "enumValues": [
-        {
-          "value": "COMMITTED",
-          "ordinal": 1
-        },
-        {
-          "value": "ABORTED",
-          "ordinal": 2
-        },
-        {
-          "value": "OPEN",
-          "ordinal": 3
-        }
-      ]
-    },
-    {
-      "name": "PrincipalType",
-      "enumValues": [
-        {
-          "value": "USER",
-          "ordinal": 1
-        },
-        {
-          "value": "ROLE",
-          "ordinal": 2
-        },
-        {
-          "value": "GROUP",
-          "ordinal": 3
-        }
-      ]
-    }
-  ],
-  "structTypes": [
-    {
-      "typeName": "t2",
-      "attributeDefinitions": [
-        {
-          "name": "a",
-          "dataTypeName": "int",
-          "multiplicity": "required",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "s",
-          "dataTypeName": "t2",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        }
-      ]
-    },
-    {
-      "typeName": "t1",
-      "attributeDefinitions": [
-        {
-          "name": "a",
-          "dataTypeName": "int",
-          "multiplicity": "required",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "b",
-          "dataTypeName": "boolean",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "c",
-          "dataTypeName": "byte",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "d",
-          "dataTypeName": "short",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "e",
-          "dataTypeName": "int",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "f",
-          "dataTypeName": "int",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "g",
-          "dataTypeName": "long",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "h",
-          "dataTypeName": "float",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "i",
-          "dataTypeName": "double",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "j",
-          "dataTypeName": "biginteger",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "k",
-          "dataTypeName": "bigdecimal",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "l",
-          "dataTypeName": "date",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "m",
-          "dataTypeName": "array<int>",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "n",
-          "dataTypeName": "array<bigdecimal>",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "o",
-          "dataTypeName": "map<string,double>",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        }
-      ]
-    },
-    {
-      "typeName": "ts1",
-      "attributeDefinitions": [
-        {
-          "name": "a",
-          "dataTypeName": "int",
-          "multiplicity": "required",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "b",
-          "dataTypeName": "boolean",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "c",
-          "dataTypeName": "byte",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "d",
-          "dataTypeName": "short",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "e",
-          "dataTypeName": "int",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "f",
-          "dataTypeName": "int",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "g",
-          "dataTypeName": "long",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "h",
-          "dataTypeName": "float",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "i",
-          "dataTypeName": "double",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "j",
-          "dataTypeName": "biginteger",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "k",
-          "dataTypeName": "bigdecimal",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "l",
-          "dataTypeName": "date",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "m",
-          "dataTypeName": "array<int>",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "n",
-          "dataTypeName": "array<bigdecimal>",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "o",
-          "dataTypeName": "map<string,double>",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        }
-      ]
-    }
-  ],
-  "traitTypes": [
-    {
-      "superTypes": [
-        "B",
-        "C"
-      ],
-      "hierarchicalMetaTypeName": "org.apache.atlas.types.TraitType",
-      "typeName": "D",
-      "attributeDefinitions": [
-        {
-          "name": "d",
-          "dataTypeName": "short",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        }
-      ]
-    },
-    {
-      "superTypes": [
-      ],
-      "hierarchicalMetaTypeName": "org.apache.atlas.types.TraitType",
-      "typeName": "A",
-      "attributeDefinitions": [
-        {
-          "name": "a",
-          "dataTypeName": "int",
-          "multiplicity": "required",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "b",
-          "dataTypeName": "boolean",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "c",
-          "dataTypeName": "byte",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "d",
-          "dataTypeName": "short",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        }
-      ]
-    },
-    {
-      "superTypes": [
-        "A"
-      ],
-      "hierarchicalMetaTypeName": "org.apache.atlas.types.TraitType",
-      "typeName": "B",
-      "attributeDefinitions": [
-        {
-          "name": "b",
-          "dataTypeName": "boolean",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        }
-      ]
-    },
-    {
-      "superTypes": [
-        "A"
-      ],
-      "hierarchicalMetaTypeName": "org.apache.atlas.types.TraitType",
-      "typeName": "C",
-      "attributeDefinitions": [
-        {
-          "name": "c",
-          "dataTypeName": "byte",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        }
-      ]
-    },
-    {
-      "superTypes": [
-      ],
-      "hierarchicalMetaTypeName": "org.apache.atlas.types.TraitType",
-      "typeName": "SecurityClearance",
-      "attributeDefinitions": [
-        {
-          "name": "level",
-          "dataTypeName": "int",
-          "multiplicity": "required",
-          "isComposite": false,
-          "reverseAttributeName": null
-        }
-      ]
-    }
-  ],
-  "classTypes": [
-    {
-      "superTypes": [
-        "Person"
-      ],
-      "hierarchicalMetaTypeName": "org.apache.atlas.types.ClassType",
-      "typeName": "Manager",
-      "attributeDefinitions": [
-        {
-          "name": "subordinates",
-          "dataTypeName": "array<Person>",
-          "multiplicity": "collection",
-          "isComposite": false,
-          "reverseAttributeName": "manager"
-        }
-      ]
-    },
-    {
-      "superTypes": [
-      ],
-      "hierarchicalMetaTypeName": "org.apache.atlas.types.ClassType",
-      "typeName": "Department",
-      "attributeDefinitions": [
-        {
-          "name": "name",
-          "dataTypeName": "string",
-          "multiplicity": "required",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "employees",
-          "dataTypeName": "array<Person>",
-          "multiplicity": "collection",
-          "isComposite": true,
-          "reverseAttributeName": "department"
-        }
-      ]
-    },
-    {
-      "superTypes": [
-      ],
-      "hierarchicalMetaTypeName": "org.apache.atlas.types.ClassType",
-      "typeName": "t4",
-      "attributeDefinitions": [
-        {
-          "name": "a",
-          "dataTypeName": "int",
-          "multiplicity": "required",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "b",
-          "dataTypeName": "boolean",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "c",
-          "dataTypeName": "byte",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "d",
-          "dataTypeName": "short",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "enum1",
-          "dataTypeName": "HiveObjectType",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "e",
-          "dataTypeName": "int",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "f",
-          "dataTypeName": "int",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "g",
-          "dataTypeName": "long",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "enum2",
-          "dataTypeName": "PrincipalType",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "h",
-          "dataTypeName": "float",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "i",
-          "dataTypeName": "double",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "j",
-          "dataTypeName": "biginteger",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "k",
-          "dataTypeName": "bigdecimal",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "enum3",
-          "dataTypeName": "TxnState",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "l",
-          "dataTypeName": "date",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "m",
-          "dataTypeName": "array<int>",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "n",
-          "dataTypeName": "array<bigdecimal>",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "o",
-          "dataTypeName": "map<string,double>",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "enum4",
-          "dataTypeName": "LockLevel",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": null
-        }
-      ]
-    },
-    {
-      "superTypes": [
-      ],
-      "hierarchicalMetaTypeName": "org.apache.atlas.types.ClassType",
-      "typeName": "Person",
-      "attributeDefinitions": [
-        {
-          "name": "name",
-          "dataTypeName": "string",
-          "multiplicity": "required",
-          "isComposite": false,
-          "reverseAttributeName": null
-        },
-        {
-          "name": "department",
-          "dataTypeName": "Department",
-          "multiplicity": "required",
-          "isComposite": false,
-          "reverseAttributeName": "employees"
-        },
-        {
-          "name": "manager",
-          "dataTypeName": "Manager",
-          "multiplicity": "optional",
-          "isComposite": false,
-          "reverseAttributeName": "subordinates"
-        }
-      ]
-    }
-  ]
-}

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/typesystem/src/test/resources/users-credentials.properties
----------------------------------------------------------------------
diff --git a/typesystem/src/test/resources/users-credentials.properties 
b/typesystem/src/test/resources/users-credentials.properties
deleted file mode 100644
index 3fc3bb1..0000000
--- a/typesystem/src/test/resources/users-credentials.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#username=group::sha256-password
-admin=ADMIN::8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
-rangertagsync=RANGER_TAG_SYNC::e3f67240f5117d1753c940dae9eea772d36ed5fe9bd9c94a300e40413f1afb9d

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/typesystem/src/test/scala/org/apache/atlas/typesystem/builders/BuilderTest.scala
----------------------------------------------------------------------
diff --git 
a/typesystem/src/test/scala/org/apache/atlas/typesystem/builders/BuilderTest.scala
 
b/typesystem/src/test/scala/org/apache/atlas/typesystem/builders/BuilderTest.scala
deleted file mode 100644
index 9d1d00f..0000000
--- 
a/typesystem/src/test/scala/org/apache/atlas/typesystem/builders/BuilderTest.scala
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.apache.atlas.typesystem.builders
-
-import org.apache.atlas.typesystem.TypesDef
-import org.apache.atlas.typesystem.types.TypeSystem
-import org.testng.annotations.BeforeMethod
-
-abstract class BuilderTest {
-
-  var tDef : TypesDef = null
-
-  @BeforeMethod
-  def before {
-    TypeSystem.getInstance().reset()
-
-    val b = new TypesBuilder
-    import b._
-
-    tDef = types {
-
-      _trait("Dimension") {}
-      _trait("PII") {}
-      _trait("Metric") {}
-      _trait("ETL") {}
-      _trait("JdbcAccess") {}
-
-      _class("DB") {
-        "name" ~ (string, required, indexed, unique)
-        "owner" ~ (string)
-        "createTime" ~ (int)
-      }
-
-      _class("StorageDesc") {
-        "inputFormat" ~ (string, required)
-        "outputFormat" ~ (string, required)
-      }
-
-      _class("Column") {
-        "name" ~ (string, required)
-        "dataType" ~ (string, required)
-        "sd" ~ ("StorageDesc", required)
-      }
-
-      _class("Table", List()) {
-        "name" ~ (string,  required,  indexed)
-        "db" ~ ("DB", required)
-        "sd" ~ ("StorageDesc", required)
-      }
-
-      _class("LoadProcess") {
-        "name" ~ (string, required)
-        "inputTables" ~ (array("Table"), collection)
-        "outputTable" ~ ("Table", required)
-
-      }
-
-      _class("View") {
-        "name" ~ (string, required)
-        "inputTables" ~ (array("Table"), collection)
-      }
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/atlas/blob/435fe3fb/typesystem/src/test/scala/org/apache/atlas/typesystem/builders/InstanceBuilderTest.scala
----------------------------------------------------------------------
diff --git 
a/typesystem/src/test/scala/org/apache/atlas/typesystem/builders/InstanceBuilderTest.scala
 
b/typesystem/src/test/scala/org/apache/atlas/typesystem/builders/InstanceBuilderTest.scala
deleted file mode 100644
index 0331c9c..0000000
--- 
a/typesystem/src/test/scala/org/apache/atlas/typesystem/builders/InstanceBuilderTest.scala
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.apache.atlas.typesystem.builders
-
-import org.apache.atlas.typesystem.types.{ClassType, Multiplicity, TypeSystem}
-import org.testng.annotations.Test
-
-class InstanceBuilderTest extends BuilderTest {
-
-  @Test def test1 {
-    TypeSystem.getInstance().defineTypes(tDef)
-
-    val b = new InstanceBuilder
-    import b._
-
-    val instances = b create {
-
-      val salesDB = instance("DB") {  // use instance to create 
Referenceables. use closure to
-                                         // set attributes of instance
-        'name ~ "Sales"                  // use '~' to set attributes. Use a 
Symbol (names starting with ') for
-                                         // attribute names.
-        'owner ~ "John ETL"
-        'createTime ~ 1000
-      }
-
-      val salesFact = instance("Table") {
-        'name ~ "sales_fact"
-        'db ~ salesDB
-        val sd = instance("StorageDesc") {    // any valid scala allowed in 
closure.
-          'inputFormat ~ "TextIputFormat"
-          'outputFormat ~ "TextOutputFormat"
-        }
-        'sd ~ sd                              // use ~ to set references, 
collections and maps.
-        val columns = Seq(
-          instance("Column") {
-            'name ~ "time_id"
-            'dataType ~ "int"
-            'sd ~ sd
-          },
-          instance("Column") {
-            'name ~ "product_id"
-            'dataType ~ "int"
-            'sd ~ sd
-          },
-          instance("Column") {
-            'name ~ "customer_id"
-            'dataType ~ "int"
-            'sd ~ sd
-          },
-          instance("Column", "Metric") {
-            'name ~ "sales"
-            'dataType ~ "int"
-            'sd ~ sd
-            'Metric("x") ~ 1                // use 'TraitName("attrName") to 
set values on traits.
-          }
-        )
-
-        'columns ~ columns
-
-      }
-
-      salesFact.sd.inputFormat ~ "TextInputFormat"   // use dot navigation to 
alter attributes in the object graph.
-                                                     // here I am fixing the 
typo in "TextInputFormat"
-      // dot navigation also works for arrays.
-      // here I am fixing column(3). Metric trait has no attributes.
-      val c = salesFact.columns
-      c(3) = instance("Column", "Metric") {
-        'name ~ "sales"
-        'dataType ~ "int"
-        'sd ~ salesFact.sd
-      }
-
-    }
-
-    val ts = TypeSystem.getInstance()
-
-    import scala.collection.JavaConversions._
-    val typedInstances = instances.map { i =>
-      val iTyp = ts.getDataType(classOf[ClassType], i.getTypeName)
-      iTyp.convert(i, Multiplicity.REQUIRED)
-    }
-
-    typedInstances.foreach { i =>
-      println(i)
-    }
-
-  }
-
-}

Reply via email to