@Test
public void schemaFieldTest() throws URISyntaxException,
		TeslaSchemaException, NoSuchAlgorithmException, SAXException,
		IOException, ParserConfigurationException {

	Schema schema = parseSchema("src/test/resources/field.tml");
	Collection<UserType> types = schema.getUserTypes();
	String[] expectedFieldNameList = new String[] { "Byte", "Int16",
			"UInt16", "Int32", "UInt32", "Int64", "UInt64", "Boolean",
			"Double", "Binary", "String" };
	Type[] expectedTypeList = new Type[] { Primitive.BYTE, Primitive.INT16,
			Primitive.UINT16, Primitive.INT32, Primitive.UINT32,
			Primitive.INT64, Primitive.UINT64, Primitive.BOOLEAN,
			Primitive.DOUBLE, Primitive.BINARY, Primitive.STRING };
	assert (expectedFieldNameList.length == expectedTypeList.length);
	assertTrue(types.iterator().next().isClass());
	Class class1 = (Class) types.iterator().next();
	for (int i = 0; i < expectedFieldNameList.length; i++) {
		String fieldName = expectedFieldNameList[i] + "Field";
		Field field = class1.findField(fieldName);
		assertNotNull(field);
		assertEquals(fieldName, field.getName());
		assertEquals(expectedTypeList[i], field.getType());
	}
}