@Test
public void parseSuccess() throws Exception {

	Schema schema = TmlProcessor.build("src/test/resources/example-v2.tml");
	Class person = (Class) schema
			.findType("class<com.expedia.tesla.example.Person>");
	assertNotNull(person);
	assertEquals(Primitive.STRING, person.findField("Name").getType());
	Primitive pbyte = (Primitive) schema.findType("byte");
	assertEquals(Primitive.BYTE, pbyte);
	Nullable nullableByte = (Nullable) schema.findType("nullable<byte>");
	assertEquals(pbyte, nullableByte.getElementType());
	assertEquals(nullableByte, person.findField("Age").getType());
	Enum sex = (Enum) schema.findType("enum<org.tesla.example.Sex>");
	assertNotNull(sex);
	assertEquals(sex, person.findField("Sex").getType());
	Class contact = (Class) schema
			.findType("class<com.expedia.tesla.example.Contact>");
	assertNotNull(contact);
	Array contactArray = (Array) schema
			.findType("array<class<com.expedia.tesla.example.Contact>>");
	assertNotNull(contactArray);
	assertEquals(contact, contactArray.getElementType());
	assertEquals(contactArray, person.findField("Contacts").getType());
	Collection<EnumEntry> sexValues = sex.getEntries();
	assertEquals(2, sexValues.size());
	assertEquals(1, sex.findEntry("Male").getValue());
	assertEquals(2, sex.findEntry("Female").getValue());
	assertEquals("Male", sex.findEntry("Male").getName());
	assertEquals("Female", sex.findEntry("Female").getName());
	Class employee = (Class) schema
			.findType("class<com.expedia.tesla.example.Employee>");
	assertNotNull(employee);
	assertEquals(person, employee.getBases().get(0));
	assertEquals(Primitive.STRING, employee.findField("Title").getType());
}