There is small typo in equals method of AttributeTypeEntity.
Instead of
AttributedTypeEntity other = (AttributedTypeEntity) obj;
there should be
AttributeTypeEntity other = (AttributeTypeEntity) obj;