	@SuppressWarnings("unchecked")
	@Test
	public void testGenerateAttribute() {

		AST ast = AST.newAST(AST.JLS3);
		CompilationUnit cu = ast.newCompilationUnit();
		EnumDeclaration ed = enumGenerator.generateEnum(clazz, ast, cu);

		EList<Property> properties = mock(EList.class);
		Iterator<Property> propertyIter = mock(Iterator.class);
		Property property = mock(Property.class);
		Type type = mock(Type.class);
		String name = "type";

		EList<Comment> comments = mock(EList.class,
				Answers.RETURNS_DEEP_STUBS.get());

		when(clazz.getAttributes()).thenReturn(properties);
		when(properties.iterator()).thenReturn(propertyIter);
		when(propertyIter.hasNext()).thenReturn(true).thenReturn(false);
		when(propertyIter.next()).thenReturn(property);
		when(property.getType()).thenReturn(type);
		when(property.getName()).thenReturn(name);
		when(property.getUpper()).thenReturn(1);
		when(property.getLower()).thenReturn(1);
		when(property.getOwnedComments()).thenReturn(comments);
		when(type.getName()).thenReturn("String");
		when(type.getQualifiedName()).thenReturn("String");

		enumGenerator.generateAttributes(clazz, ast, ed);

		assertEquals("public enum Company {; String type;\n}\n", cu.toString());
	}