/* add-persona.c generated by valac 0.13.1.106-1068, the Vala compiler
 * generated from add-persona.vala, do not modify */

/*
 * Copyright (C) 2011 Collabora Ltd.
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors: Raul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <folks-test.h>
#include <eds-test.h>
#include <folks/folks.h>
#include <stdlib.h>
#include <string.h>
#include <folks/folks-eds.h>
#include <gio/gio.h>
#include <gee.h>


#define TYPE_ADD_PERSONA_TESTS (add_persona_tests_get_type ())
#define ADD_PERSONA_TESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADD_PERSONA_TESTS, AddPersonaTests))
#define ADD_PERSONA_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADD_PERSONA_TESTS, AddPersonaTestsClass))
#define IS_ADD_PERSONA_TESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADD_PERSONA_TESTS))
#define IS_ADD_PERSONA_TESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADD_PERSONA_TESTS))
#define ADD_PERSONA_TESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADD_PERSONA_TESTS, AddPersonaTestsClass))

typedef struct _AddPersonaTests AddPersonaTests;
typedef struct _AddPersonaTestsClass AddPersonaTestsClass;
typedef struct _AddPersonaTestsPrivate AddPersonaTestsPrivate;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _eds_test_backend_unref0(var) ((var == NULL) ? NULL : (var = (eds_test_backend_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _AddPersonaTestsTestAddPersonaAsyncData AddPersonaTestsTestAddPersonaAsyncData;
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
typedef struct _AddPersonaTestsAddPersonaData AddPersonaTestsAddPersonaData;

struct _AddPersonaTests {
	FolksTestCase parent_instance;
	AddPersonaTestsPrivate * priv;
};

struct _AddPersonaTestsClass {
	FolksTestCaseClass parent_class;
};

struct _AddPersonaTestsPrivate {
	GMainLoop* _main_loop;
	EdsTestBackend* _eds_backend;
	FolksIndividualAggregator* _aggregator;
	gchar* _persona_fullname;
	gchar* _email_1;
	EdsfPersonaStore* _pstore;
	gboolean _added_persona;
	GStaticRecMutex __lock__added_persona;
	GHashTable* _properties_found;
	gchar* _avatar_path;
	gchar* _im_addr_1;
	gchar* _im_addr_2;
	gchar* _phone_1;
	gchar* _phone_2;
	FolksPostalAddressFieldDetails* _address;
	gchar* _po_box;
	gchar* _locality;
	gchar* _postal_code;
	gchar* _street;
	gchar* _extension;
	gchar* _country;
	gchar* _region;
	gchar* _family_name;
	gchar* _given_name;
	gchar* _note;
	FolksIndividual* _individual_received;
};

struct _AddPersonaTestsTestAddPersonaAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	AddPersonaTests* self;
	FolksBackendStore* _tmp0_;
	FolksBackendStore* store;
	FolksBackendStore* _tmp1_;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	FolksIndividualAggregator* _tmp4_;
	FolksBackendStore* _tmp5_;
	GeeMap* _tmp6_;
	GeeMap* _tmp7_;
	GeeCollection* _tmp8_;
	GeeCollection* _tmp9_;
	GeeCollection* _tmp10_;
	GeeIterator* _tmp11_;
	GeeIterator* _tmp12_;
	GeeIterator* _backend_it;
	GeeIterator* _tmp13_;
	gboolean _tmp14_;
	GeeIterator* _tmp15_;
	gpointer _tmp16_;
	FolksBackend* backend;
	FolksBackend* _tmp17_;
	GeeMap* _tmp18_;
	GeeMap* _tmp19_;
	gpointer _tmp20_;
	EdsfPersonaStore* _tmp21_;
	EdsfPersonaStore* _tmp22_;
	EdsfPersonaStore* _tmp23_;
	GError* e;
	GError* _tmp24_;
	const gchar* _tmp25_;
	GError * _inner_error_;
};

struct _AddPersonaTestsAddPersonaData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	AddPersonaTests* self;
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GHashTable* details;
	GValue _tmp3_;
	GValue _tmp4_;
	GValue _tmp5_;
	GValue* _tmp6_;
	GValue* _tmp7_;
	GValue* v1;
	GValue* _tmp8_;
	const gchar* _tmp9_;
	GHashTable* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	GValue* _tmp13_;
	GValue _tmp14_;
	GValue _tmp15_;
	GValue _tmp16_;
	GValue* _tmp17_;
	GValue* _tmp18_;
	GValue* v2;
	GeeHashSet* _tmp19_;
	GeeHashSet* emails;
	const gchar* _tmp20_;
	FolksEmailFieldDetails* _tmp21_;
	FolksEmailFieldDetails* email_1;
	FolksEmailFieldDetails* _tmp22_;
	const gchar* _tmp23_;
	GeeHashSet* _tmp24_;
	FolksEmailFieldDetails* _tmp25_;
	GValue* _tmp26_;
	GeeHashSet* _tmp27_;
	GHashTable* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	GValue* _tmp31_;
	GValue _tmp32_;
	GValue _tmp33_;
	GValue _tmp34_;
	GValue* _tmp35_;
	GValue* _tmp36_;
	GValue* v3;
	const gchar* _tmp37_;
	GFile* _tmp38_;
	GFile* _tmp39_;
	GFileIcon* _tmp40_;
	GFileIcon* _tmp41_;
	GFileIcon* avatar;
	GValue* _tmp42_;
	GFileIcon* _tmp43_;
	GHashTable* _tmp44_;
	const gchar* _tmp45_;
	gchar* _tmp46_;
	GValue* _tmp47_;
	GValue _tmp48_;
	GValue _tmp49_;
	GValue _tmp50_;
	GValue* _tmp51_;
	GValue* _tmp52_;
	GValue* v4;
	GeeHashMultiMap* _tmp53_;
	GeeHashMultiMap* im_fds;
	GeeHashMultiMap* _tmp54_;
	const gchar* _tmp55_;
	FolksImFieldDetails* _tmp56_;
	FolksImFieldDetails* _tmp57_;
	GeeHashMultiMap* _tmp58_;
	const gchar* _tmp59_;
	FolksImFieldDetails* _tmp60_;
	FolksImFieldDetails* _tmp61_;
	GValue* _tmp62_;
	GeeHashMultiMap* _tmp63_;
	GHashTable* _tmp64_;
	const gchar* _tmp65_;
	gchar* _tmp66_;
	GValue* _tmp67_;
	GValue* _tmp68_;
	GValue _tmp69_;
	GValue _tmp70_;
	GValue _tmp71_;
	GValue* _tmp72_;
	GValue* _tmp73_;
	GValue* v5;
	GeeHashSet* _tmp74_;
	GeeHashSet* phones;
	const gchar* _tmp75_;
	FolksPhoneFieldDetails* _tmp76_;
	FolksPhoneFieldDetails* phone_1;
	FolksPhoneFieldDetails* _tmp77_;
	const gchar* _tmp78_;
	GeeHashSet* _tmp79_;
	FolksPhoneFieldDetails* _tmp80_;
	const gchar* _tmp81_;
	FolksPhoneFieldDetails* _tmp82_;
	FolksPhoneFieldDetails* phone_2;
	FolksPhoneFieldDetails* _tmp83_;
	const gchar* _tmp84_;
	GeeHashSet* _tmp85_;
	FolksPhoneFieldDetails* _tmp86_;
	GValue* _tmp87_;
	GeeHashSet* _tmp88_;
	GHashTable* _tmp89_;
	const gchar* _tmp90_;
	gchar* _tmp91_;
	GValue* _tmp92_;
	GValue _tmp93_;
	GValue _tmp94_;
	GValue _tmp95_;
	GValue* _tmp96_;
	GValue* _tmp97_;
	GValue* v6;
	GeeHashSet* _tmp98_;
	GeeHashSet* pa_fds;
	const gchar* _tmp99_;
	const gchar* _tmp100_;
	const gchar* _tmp101_;
	const gchar* _tmp102_;
	const gchar* _tmp103_;
	const gchar* _tmp104_;
	const gchar* _tmp105_;
	FolksPostalAddress* _tmp106_;
	FolksPostalAddress* pa_a;
	FolksPostalAddress* _tmp107_;
	FolksPostalAddressFieldDetails* _tmp108_;
	FolksPostalAddressFieldDetails* pa_fd_a;
	FolksPostalAddressFieldDetails* _tmp109_;
	const gchar* _tmp110_;
	GeeHashSet* _tmp111_;
	FolksPostalAddressFieldDetails* _tmp112_;
	GValue* _tmp113_;
	GeeHashSet* _tmp114_;
	GHashTable* _tmp115_;
	const gchar* _tmp116_;
	gchar* _tmp117_;
	GValue* _tmp118_;
	GValue _tmp119_;
	GValue _tmp120_;
	GValue _tmp121_;
	GValue* _tmp122_;
	GValue* _tmp123_;
	GValue* v7;
	const gchar* _tmp124_;
	const gchar* _tmp125_;
	FolksStructuredName* _tmp126_;
	FolksStructuredName* sname;
	GValue* _tmp127_;
	FolksStructuredName* _tmp128_;
	GHashTable* _tmp129_;
	const gchar* _tmp130_;
	gchar* _tmp131_;
	GValue* _tmp132_;
	GValue _tmp133_;
	GValue _tmp134_;
	GValue _tmp135_;
	GValue* _tmp136_;
	GValue* _tmp137_;
	GValue* v8;
	GeeHashSet* _tmp138_;
	GeeHashSet* notes;
	const gchar* _tmp139_;
	FolksNoteFieldDetails* _tmp140_;
	FolksNoteFieldDetails* note;
	GeeHashSet* _tmp141_;
	FolksNoteFieldDetails* _tmp142_;
	GValue* _tmp143_;
	GeeHashSet* _tmp144_;
	GHashTable* _tmp145_;
	const gchar* _tmp146_;
	gchar* _tmp147_;
	GValue* _tmp148_;
	FolksIndividualAggregator* _tmp149_;
	EdsfPersonaStore* _tmp150_;
	GHashTable* _tmp151_;
	FolksPersona* _tmp152_;
	FolksPersona* _tmp153_;
	GError* e;
	GError* _tmp154_;
	const gchar* _tmp155_;
	GError * _inner_error_;
};


static gpointer add_persona_tests_parent_class = NULL;

GType add_persona_tests_get_type (void) G_GNUC_CONST;
#define ADD_PERSONA_TESTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ADD_PERSONA_TESTS, AddPersonaTestsPrivate))
enum  {
	ADD_PERSONA_TESTS_DUMMY_PROPERTY
};
AddPersonaTests* add_persona_tests_new (void);
AddPersonaTests* add_persona_tests_construct (GType object_type);
void add_persona_tests_test_add_persona (AddPersonaTests* self);
static void _add_persona_tests_test_add_persona_folks_test_case_test_method (gpointer self);
static void add_persona_tests_real_set_up (FolksTestCase* base);
static void add_persona_tests_real_tear_down (FolksTestCase* base);
static void _g_free0_ (gpointer var);
static void _add_persona_tests_test_add_persona_async (AddPersonaTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _add_persona_tests_test_add_persona_finish (AddPersonaTests* self, GAsyncResult* _res_);
static gboolean _lambda0_ (AddPersonaTests* self);
static gboolean __lambda0__gsource_func (gpointer self);
static void _add_persona_tests_test_add_persona_async_data_free (gpointer _data);
static gboolean _add_persona_tests_test_add_persona_async_co (AddPersonaTestsTestAddPersonaAsyncData* _data_);
static void _add_persona_tests_test_add_persona_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _add_persona_tests_individuals_changed_cb (AddPersonaTests* self, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason);
static void __add_persona_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self);
static void _add_persona_tests_notify_pstore_cb (AddPersonaTests* self, GObject* _pstore, GParamSpec* ps);
static void __add_persona_tests_notify_pstore_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _add_persona_tests_try_to_add (AddPersonaTests* self);
static void _add_persona_tests_add_persona_data_free (gpointer _data);
static void _add_persona_tests_add_persona (AddPersonaTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _add_persona_tests_add_persona_finish (AddPersonaTests* self, GAsyncResult* _res_);
static gboolean _add_persona_tests_add_persona_co (AddPersonaTestsAddPersonaData* _data_);
static void _vala_GValue_free (GValue* self);
static void __vala_GValue_free0_ (gpointer var);
static GValue* _g_value_dup (GValue* self);
static void _add_persona_tests_add_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static guint _add_persona_tests_track_individual (AddPersonaTests* self, FolksIndividual* i);
static void _add_persona_tests_notify_cb (AddPersonaTests* self, GObject* individual_obj, GParamSpec* ps);
static void __add_persona_tests_notify_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _add_persona_tests_check_properties (AddPersonaTests* self, FolksIndividual* i);
static void _add_persona_tests_exit_if_all_properties_found (AddPersonaTests* self);
static void add_persona_tests_finalize (GObject* obj);
gint _vala_main (gchar** args, int args_length1);


static void _add_persona_tests_test_add_persona_folks_test_case_test_method (gpointer self) {
	add_persona_tests_test_add_persona (self);
}


AddPersonaTests* add_persona_tests_construct (GType object_type) {
	AddPersonaTests * self = NULL;
	EdsTestBackend* _tmp0_;
	self = (AddPersonaTests*) folks_test_case_construct (object_type, "AddPersonaTests");
	_tmp0_ = eds_test_backend_new ();
	_eds_test_backend_unref0 (self->priv->_eds_backend);
	self->priv->_eds_backend = _tmp0_;
	folks_test_case_add_test ((FolksTestCase*) self, "test adding a persona to e-d-s ", _add_persona_tests_test_add_persona_folks_test_case_test_method, self);
	return self;
}


AddPersonaTests* add_persona_tests_new (void) {
	return add_persona_tests_construct (TYPE_ADD_PERSONA_TESTS);
}


static void add_persona_tests_real_set_up (FolksTestCase* base) {
	AddPersonaTests * self;
	EdsTestBackend* _tmp0_;
	self = (AddPersonaTests*) base;
	_tmp0_ = self->priv->_eds_backend;
	eds_test_backend_set_up (_tmp0_);
}


static void add_persona_tests_real_tear_down (FolksTestCase* base) {
	AddPersonaTests * self;
	EdsTestBackend* _tmp0_;
	self = (AddPersonaTests*) base;
	_tmp0_ = self->priv->_eds_backend;
	eds_test_backend_tear_down (_tmp0_);
}


static void _g_free0_ (gpointer var) {
	var = (g_free (var), NULL);
}


static gboolean _lambda0_ (AddPersonaTests* self) {
	gboolean result = FALSE;
	GMainLoop* _tmp0_;
	_tmp0_ = self->priv->_main_loop;
	g_main_loop_quit (_tmp0_);
	g_assert_not_reached ();
	return result;
}


static gboolean __lambda0__gsource_func (gpointer self) {
	gboolean result;
	result = _lambda0_ (self);
	return result;
}


void add_persona_tests_test_add_persona (AddPersonaTests* self) {
	GMainLoop* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	FolksPostalAddress* _tmp18_;
	FolksPostalAddress* pa;
	FolksPostalAddress* _tmp19_;
	FolksPostalAddressFieldDetails* _tmp20_;
	FolksPostalAddressFieldDetails* _tmp21_;
	const gchar* _tmp22_;
	GHashFunc _tmp23_;
	GEqualFunc _tmp24_;
	GHashTable* _tmp25_;
	GHashTable* _tmp26_;
	gchar* _tmp27_;
	GHashTable* _tmp28_;
	gchar* _tmp29_;
	GHashTable* _tmp30_;
	gchar* _tmp31_;
	GHashTable* _tmp32_;
	gchar* _tmp33_;
	GHashTable* _tmp34_;
	gchar* _tmp35_;
	GHashTable* _tmp36_;
	gchar* _tmp37_;
	GHashTable* _tmp38_;
	gchar* _tmp39_;
	GHashTable* _tmp40_;
	gchar* _tmp41_;
	GHashTable* _tmp42_;
	gchar* _tmp43_;
	GHashTable* _tmp44_;
	gchar* _tmp45_;
	GMainLoop* _tmp46_;
	GHashTable* _tmp47_;
	GList* _tmp48_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_main_loop_new (NULL, FALSE);
	_g_main_loop_unref0 (self->priv->_main_loop);
	self->priv->_main_loop = _tmp0_;
	_tmp1_ = g_strdup ("persona #1");
	_g_free0 (self->priv->_persona_fullname);
	self->priv->_persona_fullname = _tmp1_;
	_tmp2_ = g_strdup ("someone-1@example.org");
	_g_free0 (self->priv->_email_1);
	self->priv->_email_1 = _tmp2_;
	_tmp3_ = g_getenv ("AVATAR_FILE_PATH");
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (self->priv->_avatar_path);
	self->priv->_avatar_path = _tmp4_;
	_tmp5_ = g_strdup ("someone-1@jabber.example.org");
	_g_free0 (self->priv->_im_addr_1);
	self->priv->_im_addr_1 = _tmp5_;
	_tmp6_ = g_strdup ("someone-2@jabber.example.org");
	_g_free0 (self->priv->_im_addr_2);
	self->priv->_im_addr_2 = _tmp6_;
	_tmp7_ = g_strdup ("12345");
	_g_free0 (self->priv->_phone_1);
	self->priv->_phone_1 = _tmp7_;
	_tmp8_ = g_strdup ("54321");
	_g_free0 (self->priv->_phone_2);
	self->priv->_phone_2 = _tmp8_;
	_tmp9_ = g_strdup ("family");
	_g_free0 (self->priv->_family_name);
	self->priv->_family_name = _tmp9_;
	_tmp10_ = g_strdup ("given");
	_g_free0 (self->priv->_given_name);
	self->priv->_given_name = _tmp10_;
	_tmp11_ = self->priv->_po_box;
	_tmp12_ = self->priv->_extension;
	_tmp13_ = self->priv->_street;
	_tmp14_ = self->priv->_locality;
	_tmp15_ = self->priv->_region;
	_tmp16_ = self->priv->_postal_code;
	_tmp17_ = self->priv->_country;
	_tmp18_ = folks_postal_address_new (_tmp11_, _tmp12_, _tmp13_, _tmp14_, _tmp15_, _tmp16_, _tmp17_, NULL, NULL);
	pa = _tmp18_;
	_tmp19_ = pa;
	_tmp20_ = folks_postal_address_field_details_new (_tmp19_, NULL);
	_g_object_unref0 (self->priv->_address);
	self->priv->_address = _tmp20_;
	_tmp21_ = self->priv->_address;
	_tmp22_ = EDSF_PERSONA_address_fields[0];
	folks_abstract_field_details_add_parameter ((FolksAbstractFieldDetails*) _tmp21_, "type", _tmp22_);
	_tmp23_ = g_str_hash;
	_tmp24_ = g_str_equal;
	_tmp25_ = g_hash_table_new_full (_tmp23_, _tmp24_, _g_free0_, NULL);
	_g_hash_table_unref0 (self->priv->_properties_found);
	self->priv->_properties_found = _tmp25_;
	_tmp26_ = self->priv->_properties_found;
	_tmp27_ = g_strdup ("full_name");
	g_hash_table_insert (_tmp26_, _tmp27_, GINT_TO_POINTER (FALSE));
	_tmp28_ = self->priv->_properties_found;
	_tmp29_ = g_strdup ("email-1");
	g_hash_table_insert (_tmp28_, _tmp29_, GINT_TO_POINTER (FALSE));
	_tmp30_ = self->priv->_properties_found;
	_tmp31_ = g_strdup ("avatar");
	g_hash_table_insert (_tmp30_, _tmp31_, GINT_TO_POINTER (FALSE));
	_tmp32_ = self->priv->_properties_found;
	_tmp33_ = g_strdup ("im-addr-1");
	g_hash_table_insert (_tmp32_, _tmp33_, GINT_TO_POINTER (FALSE));
	_tmp34_ = self->priv->_properties_found;
	_tmp35_ = g_strdup ("im-addr-2");
	g_hash_table_insert (_tmp34_, _tmp35_, GINT_TO_POINTER (FALSE));
	_tmp36_ = self->priv->_properties_found;
	_tmp37_ = g_strdup ("phone-1");
	g_hash_table_insert (_tmp36_, _tmp37_, GINT_TO_POINTER (FALSE));
	_tmp38_ = self->priv->_properties_found;
	_tmp39_ = g_strdup ("phone-2");
	g_hash_table_insert (_tmp38_, _tmp39_, GINT_TO_POINTER (FALSE));
	_tmp40_ = self->priv->_properties_found;
	_tmp41_ = g_strdup ("postal-address-1");
	g_hash_table_insert (_tmp40_, _tmp41_, GINT_TO_POINTER (FALSE));
	_tmp42_ = self->priv->_properties_found;
	_tmp43_ = g_strdup ("structured_name");
	g_hash_table_insert (_tmp42_, _tmp43_, GINT_TO_POINTER (FALSE));
	_tmp44_ = self->priv->_properties_found;
	_tmp45_ = g_strdup ("note");
	g_hash_table_insert (_tmp44_, _tmp45_, GINT_TO_POINTER (FALSE));
	_add_persona_tests_test_add_persona_async (self, NULL, NULL);
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, __lambda0__gsource_func, g_object_ref (self), g_object_unref);
	_tmp46_ = self->priv->_main_loop;
	g_main_loop_run (_tmp46_);
	_tmp47_ = self->priv->_properties_found;
	_tmp48_ = g_hash_table_get_values (_tmp47_);
	{
		GList* k_collection = NULL;
		GList* k_it = NULL;
		k_collection = _tmp48_;
		for (k_it = k_collection; k_it != NULL; k_it = k_it->next) {
			gboolean k = FALSE;
			k = GPOINTER_TO_INT (k_it->data);
			{
				gboolean _tmp49_;
				_tmp49_ = k;
				g_assert (_tmp49_);
			}
		}
		_g_list_free0 (k_collection);
	}
	_g_object_unref0 (pa);
}


static void _add_persona_tests_test_add_persona_async_data_free (gpointer _data) {
	AddPersonaTestsTestAddPersonaAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (AddPersonaTestsTestAddPersonaAsyncData, _data_);
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void _add_persona_tests_test_add_persona_async (AddPersonaTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	AddPersonaTestsTestAddPersonaAsyncData* _data_;
	AddPersonaTests* _tmp0_;
	_data_ = g_slice_new0 (AddPersonaTestsTestAddPersonaAsyncData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _add_persona_tests_test_add_persona_async);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _add_persona_tests_test_add_persona_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_add_persona_tests_test_add_persona_async_co (_data_);
}


static void _add_persona_tests_test_add_persona_finish (AddPersonaTests* self, GAsyncResult* _res_) {
	AddPersonaTestsTestAddPersonaAsyncData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _add_persona_tests_test_add_persona_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	AddPersonaTestsTestAddPersonaAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_add_persona_tests_test_add_persona_async_co (_data_);
}


static void __add_persona_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed (FolksIndividualAggregator* _sender, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason, gpointer self) {
	_add_persona_tests_individuals_changed_cb (self, added, removed, message, actor, reason);
}


static void __add_persona_tests_notify_pstore_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_add_persona_tests_notify_pstore_cb (self, _sender, pspec);
}


static gboolean _add_persona_tests_test_add_persona_async_co (AddPersonaTestsTestAddPersonaAsyncData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = folks_backend_store_dup ();
	_data_->store = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->store;
	_data_->_state_ = 1;
	folks_backend_store_prepare (_data_->_tmp1_, _add_persona_tests_test_add_persona_async_ready, _data_);
	return FALSE;
	_state_1:
	folks_backend_store_prepare_finish (_data_->_tmp1_, _data_->_res_);
	_data_->_tmp2_ = folks_individual_aggregator_new ();
	_g_object_unref0 (_data_->self->priv->_aggregator);
	_data_->self->priv->_aggregator = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->self->priv->_aggregator;
	g_signal_connect_object (_data_->_tmp3_, "individuals-changed", (GCallback) __add_persona_tests_individuals_changed_cb_folks_individual_aggregator_individuals_changed, _data_->self, 0);
	{
		_data_->_tmp4_ = _data_->self->priv->_aggregator;
		_data_->_state_ = 2;
		folks_individual_aggregator_prepare (_data_->_tmp4_, _add_persona_tests_test_add_persona_async_ready, _data_);
		return FALSE;
		_state_2:
		folks_individual_aggregator_prepare_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			goto __catch0_g_error;
		}
		_g_object_unref0 (_data_->self->priv->_pstore);
		_data_->self->priv->_pstore = NULL;
		{
			_data_->_tmp5_ = _data_->store;
			_data_->_tmp6_ = folks_backend_store_get_enabled_backends (_data_->_tmp5_);
			_data_->_tmp7_ = _data_->_tmp6_;
			_data_->_tmp8_ = gee_map_get_values (_data_->_tmp7_);
			_data_->_tmp9_ = _data_->_tmp8_;
			_data_->_tmp10_ = _data_->_tmp9_;
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp10_);
			_data_->_tmp12_ = _data_->_tmp11_;
			_g_object_unref0 (_data_->_tmp10_);
			_data_->_backend_it = _data_->_tmp12_;
			while (TRUE) {
				_data_->_tmp13_ = _data_->_backend_it;
				_data_->_tmp14_ = FALSE;
				_data_->_tmp14_ = gee_iterator_next (_data_->_tmp13_);
				if (!_data_->_tmp14_) {
					break;
				}
				_data_->_tmp15_ = _data_->_backend_it;
				_data_->_tmp16_ = NULL;
				_data_->_tmp16_ = gee_iterator_get (_data_->_tmp15_);
				_data_->backend = (FolksBackend*) _data_->_tmp16_;
				_data_->_tmp17_ = _data_->backend;
				_data_->_tmp18_ = folks_backend_get_persona_stores (_data_->_tmp17_);
				_data_->_tmp19_ = _data_->_tmp18_;
				_data_->_tmp20_ = NULL;
				_data_->_tmp20_ = gee_map_get (_data_->_tmp19_, "local://test");
				_g_object_unref0 (_data_->self->priv->_pstore);
				_data_->self->priv->_pstore = EDSF_PERSONA_STORE ((FolksPersonaStore*) _data_->_tmp20_);
				_data_->_tmp21_ = _data_->self->priv->_pstore;
				if (_data_->_tmp21_ != NULL) {
					_g_object_unref0 (_data_->backend);
					break;
				}
				_g_object_unref0 (_data_->backend);
			}
			_g_object_unref0 (_data_->_backend_it);
		}
		_data_->_tmp22_ = _data_->self->priv->_pstore;
		g_assert (_data_->_tmp22_ != NULL);
		_data_->_tmp23_ = _data_->self->priv->_pstore;
		g_signal_connect_object ((GObject*) _data_->_tmp23_, "notify::is-prepared", (GCallback) __add_persona_tests_notify_pstore_cb_g_object_notify, _data_->self, 0);
		_add_persona_tests_try_to_add (_data_->self);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp24_ = _data_->e;
		_data_->_tmp25_ = _data_->_tmp24_->message;
		g_warning ("add-persona.vala:144: Error when calling prepare: %s\n", _data_->_tmp25_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (_data_->_inner_error_ != NULL) {
		_g_object_unref0 (_data_->store);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_g_object_unref0 (_data_->store);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void _add_persona_tests_add_persona_data_free (gpointer _data) {
	AddPersonaTestsAddPersonaData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (AddPersonaTestsAddPersonaData, _data_);
}


static void _add_persona_tests_add_persona (AddPersonaTests* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	AddPersonaTestsAddPersonaData* _data_;
	AddPersonaTests* _tmp0_;
	_data_ = g_slice_new0 (AddPersonaTestsAddPersonaData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _add_persona_tests_add_persona);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _add_persona_tests_add_persona_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_add_persona_tests_add_persona_co (_data_);
}


static void _add_persona_tests_add_persona_finish (AddPersonaTests* self, GAsyncResult* _res_) {
	AddPersonaTestsAddPersonaData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _vala_GValue_free (GValue* self) {
	g_value_unset (self);
	g_free (self);
}


static void __vala_GValue_free0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL));
}


static GValue* _g_value_dup (GValue* self) {
	return g_boxed_copy (G_TYPE_VALUE, self);
}


static gpointer __g_value_dup0 (gpointer self) {
	return self ? _g_value_dup (self) : NULL;
}


static void _add_persona_tests_add_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	AddPersonaTestsAddPersonaData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_add_persona_tests_add_persona_co (_data_);
}


static gboolean _add_persona_tests_add_persona_co (AddPersonaTestsAddPersonaData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_str_hash;
	_data_->_tmp1_ = g_str_equal;
	_data_->_tmp2_ = g_hash_table_new_full (_data_->_tmp0_, _data_->_tmp1_, _g_free0_, __vala_GValue_free0_);
	_data_->details = _data_->_tmp2_;
	memset (&_data_->_tmp3_, 0, sizeof (GValue));
	g_value_init (&_data_->_tmp3_, G_TYPE_STRING);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = __g_value_dup0 (&_data_->_tmp5_);
	_data_->_tmp7_ = _data_->_tmp6_;
	G_IS_VALUE (&_data_->_tmp5_) ? (g_value_unset (&_data_->_tmp5_), NULL) : NULL;
	_data_->v1 = _data_->_tmp7_;
	_data_->_tmp8_ = _data_->v1;
	_data_->_tmp9_ = _data_->self->priv->_persona_fullname;
	g_value_set_string (_data_->_tmp8_, _data_->_tmp9_);
	_data_->_tmp10_ = _data_->details;
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_FULL_NAME);
	_data_->_tmp12_ = g_strdup (_data_->_tmp11_);
	_data_->_tmp13_ = _data_->v1;
	_data_->v1 = NULL;
	g_hash_table_insert (_data_->_tmp10_, _data_->_tmp12_, _data_->_tmp13_);
	memset (&_data_->_tmp14_, 0, sizeof (GValue));
	g_value_init (&_data_->_tmp14_, GEE_TYPE_SET);
	_data_->_tmp15_ = _data_->_tmp14_;
	_data_->_tmp16_ = _data_->_tmp15_;
	_data_->_tmp17_ = __g_value_dup0 (&_data_->_tmp16_);
	_data_->_tmp18_ = _data_->_tmp17_;
	G_IS_VALUE (&_data_->_tmp16_) ? (g_value_unset (&_data_->_tmp16_), NULL) : NULL;
	_data_->v2 = _data_->_tmp18_;
	_data_->_tmp19_ = gee_hash_set_new (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
	_data_->emails = _data_->_tmp19_;
	_data_->_tmp20_ = _data_->self->priv->_email_1;
	_data_->_tmp21_ = folks_email_field_details_new (_data_->_tmp20_, NULL);
	_data_->email_1 = _data_->_tmp21_;
	_data_->_tmp22_ = _data_->email_1;
	_data_->_tmp23_ = EDSF_PERSONA_email_fields[0];
	folks_abstract_field_details_set_parameter ((FolksAbstractFieldDetails*) _data_->_tmp22_, "type", _data_->_tmp23_);
	_data_->_tmp24_ = _data_->emails;
	_data_->_tmp25_ = _data_->email_1;
	gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp24_, _data_->_tmp25_);
	_data_->_tmp26_ = _data_->v2;
	_data_->_tmp27_ = _data_->emails;
	g_value_set_object (_data_->_tmp26_, (GObject*) _data_->_tmp27_);
	_data_->_tmp28_ = _data_->details;
	_data_->_tmp29_ = NULL;
	_data_->_tmp29_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_EMAIL_ADDRESSES);
	_data_->_tmp30_ = g_strdup (_data_->_tmp29_);
	_data_->_tmp31_ = _data_->v2;
	_data_->v2 = NULL;
	g_hash_table_insert (_data_->_tmp28_, _data_->_tmp30_, _data_->_tmp31_);
	memset (&_data_->_tmp32_, 0, sizeof (GValue));
	g_value_init (&_data_->_tmp32_, G_TYPE_LOADABLE_ICON);
	_data_->_tmp33_ = _data_->_tmp32_;
	_data_->_tmp34_ = _data_->_tmp33_;
	_data_->_tmp35_ = __g_value_dup0 (&_data_->_tmp34_);
	_data_->_tmp36_ = _data_->_tmp35_;
	G_IS_VALUE (&_data_->_tmp34_) ? (g_value_unset (&_data_->_tmp34_), NULL) : NULL;
	_data_->v3 = _data_->_tmp36_;
	_data_->_tmp37_ = _data_->self->priv->_avatar_path;
	_data_->_tmp38_ = NULL;
	_data_->_tmp38_ = g_file_new_for_path (_data_->_tmp37_);
	_data_->_tmp39_ = _data_->_tmp38_;
	_data_->_tmp40_ = (GFileIcon*) g_file_icon_new (_data_->_tmp39_);
	_data_->_tmp41_ = _data_->_tmp40_;
	_g_object_unref0 (_data_->_tmp39_);
	_data_->avatar = _data_->_tmp41_;
	_data_->_tmp42_ = _data_->v3;
	_data_->_tmp43_ = _data_->avatar;
	g_value_set_object (_data_->_tmp42_, (GObject*) _data_->_tmp43_);
	_data_->_tmp44_ = _data_->details;
	_data_->_tmp45_ = NULL;
	_data_->_tmp45_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_AVATAR);
	_data_->_tmp46_ = g_strdup (_data_->_tmp45_);
	_data_->_tmp47_ = _data_->v3;
	_data_->v3 = NULL;
	g_hash_table_insert (_data_->_tmp44_, _data_->_tmp46_, _data_->_tmp47_);
	memset (&_data_->_tmp48_, 0, sizeof (GValue));
	g_value_init (&_data_->_tmp48_, GEE_TYPE_MULTI_MAP);
	_data_->_tmp49_ = _data_->_tmp48_;
	_data_->_tmp50_ = _data_->_tmp49_;
	_data_->_tmp51_ = __g_value_dup0 (&_data_->_tmp50_);
	_data_->_tmp52_ = _data_->_tmp51_;
	G_IS_VALUE (&_data_->_tmp50_) ? (g_value_unset (&_data_->_tmp50_), NULL) : NULL;
	_data_->v4 = _data_->_tmp52_;
	_data_->_tmp53_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_IM_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL);
	_data_->im_fds = _data_->_tmp53_;
	_data_->_tmp54_ = _data_->im_fds;
	_data_->_tmp55_ = _data_->self->priv->_im_addr_1;
	_data_->_tmp56_ = folks_im_field_details_new (_data_->_tmp55_, NULL);
	_data_->_tmp57_ = _data_->_tmp56_;
	gee_multi_map_set ((GeeMultiMap*) _data_->_tmp54_, "jabber", _data_->_tmp57_);
	_g_object_unref0 (_data_->_tmp57_);
	_data_->_tmp58_ = _data_->im_fds;
	_data_->_tmp59_ = _data_->self->priv->_im_addr_2;
	_data_->_tmp60_ = folks_im_field_details_new (_data_->_tmp59_, NULL);
	_data_->_tmp61_ = _data_->_tmp60_;
	gee_multi_map_set ((GeeMultiMap*) _data_->_tmp58_, "yahoo", _data_->_tmp61_);
	_g_object_unref0 (_data_->_tmp61_);
	_data_->_tmp62_ = _data_->v4;
	_data_->_tmp63_ = _data_->im_fds;
	g_value_set_object (_data_->_tmp62_, (GObject*) _data_->_tmp63_);
	_data_->_tmp64_ = _data_->details;
	_data_->_tmp65_ = NULL;
	_data_->_tmp65_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_IM_ADDRESSES);
	_data_->_tmp66_ = g_strdup (_data_->_tmp65_);
	_data_->_tmp67_ = _data_->v4;
	_data_->_tmp68_ = __g_value_dup0 (_data_->_tmp67_);
	g_hash_table_insert (_data_->_tmp64_, _data_->_tmp66_, _data_->_tmp68_);
	memset (&_data_->_tmp69_, 0, sizeof (GValue));
	g_value_init (&_data_->_tmp69_, GEE_TYPE_SET);
	_data_->_tmp70_ = _data_->_tmp69_;
	_data_->_tmp71_ = _data_->_tmp70_;
	_data_->_tmp72_ = __g_value_dup0 (&_data_->_tmp71_);
	_data_->_tmp73_ = _data_->_tmp72_;
	G_IS_VALUE (&_data_->_tmp71_) ? (g_value_unset (&_data_->_tmp71_), NULL) : NULL;
	_data_->v5 = _data_->_tmp73_;
	_data_->_tmp74_ = gee_hash_set_new (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
	_data_->phones = _data_->_tmp74_;
	_data_->_tmp75_ = _data_->self->priv->_phone_1;
	_data_->_tmp76_ = folks_phone_field_details_new (_data_->_tmp75_, NULL);
	_data_->phone_1 = _data_->_tmp76_;
	_data_->_tmp77_ = _data_->phone_1;
	_data_->_tmp78_ = EDSF_PERSONA_phone_fields[0];
	folks_abstract_field_details_set_parameter ((FolksAbstractFieldDetails*) _data_->_tmp77_, "type", _data_->_tmp78_);
	_data_->_tmp79_ = _data_->phones;
	_data_->_tmp80_ = _data_->phone_1;
	gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp79_, _data_->_tmp80_);
	_data_->_tmp81_ = _data_->self->priv->_phone_2;
	_data_->_tmp82_ = folks_phone_field_details_new (_data_->_tmp81_, NULL);
	_data_->phone_2 = _data_->_tmp82_;
	_data_->_tmp83_ = _data_->phone_2;
	_data_->_tmp84_ = EDSF_PERSONA_phone_fields[1];
	folks_abstract_field_details_set_parameter ((FolksAbstractFieldDetails*) _data_->_tmp83_, "type", _data_->_tmp84_);
	_data_->_tmp85_ = _data_->phones;
	_data_->_tmp86_ = _data_->phone_2;
	gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp85_, _data_->_tmp86_);
	_data_->_tmp87_ = _data_->v5;
	_data_->_tmp88_ = _data_->phones;
	g_value_set_object (_data_->_tmp87_, (GObject*) _data_->_tmp88_);
	_data_->_tmp89_ = _data_->details;
	_data_->_tmp90_ = NULL;
	_data_->_tmp90_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_PHONE_NUMBERS);
	_data_->_tmp91_ = g_strdup (_data_->_tmp90_);
	_data_->_tmp92_ = _data_->v5;
	_data_->v5 = NULL;
	g_hash_table_insert (_data_->_tmp89_, _data_->_tmp91_, _data_->_tmp92_);
	memset (&_data_->_tmp93_, 0, sizeof (GValue));
	g_value_init (&_data_->_tmp93_, GEE_TYPE_SET);
	_data_->_tmp94_ = _data_->_tmp93_;
	_data_->_tmp95_ = _data_->_tmp94_;
	_data_->_tmp96_ = __g_value_dup0 (&_data_->_tmp95_);
	_data_->_tmp97_ = _data_->_tmp96_;
	G_IS_VALUE (&_data_->_tmp95_) ? (g_value_unset (&_data_->_tmp95_), NULL) : NULL;
	_data_->v6 = _data_->_tmp97_;
	_data_->_tmp98_ = gee_hash_set_new (FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
	_data_->pa_fds = _data_->_tmp98_;
	_data_->_tmp99_ = _data_->self->priv->_po_box;
	_data_->_tmp100_ = _data_->self->priv->_extension;
	_data_->_tmp101_ = _data_->self->priv->_street;
	_data_->_tmp102_ = _data_->self->priv->_locality;
	_data_->_tmp103_ = _data_->self->priv->_region;
	_data_->_tmp104_ = _data_->self->priv->_postal_code;
	_data_->_tmp105_ = _data_->self->priv->_country;
	_data_->_tmp106_ = folks_postal_address_new (_data_->_tmp99_, _data_->_tmp100_, _data_->_tmp101_, _data_->_tmp102_, _data_->_tmp103_, _data_->_tmp104_, _data_->_tmp105_, NULL, NULL);
	_data_->pa_a = _data_->_tmp106_;
	_data_->_tmp107_ = _data_->pa_a;
	_data_->_tmp108_ = folks_postal_address_field_details_new (_data_->_tmp107_, NULL);
	_data_->pa_fd_a = _data_->_tmp108_;
	_data_->_tmp109_ = _data_->pa_fd_a;
	_data_->_tmp110_ = EDSF_PERSONA_address_fields[0];
	folks_abstract_field_details_add_parameter ((FolksAbstractFieldDetails*) _data_->_tmp109_, "types", _data_->_tmp110_);
	_data_->_tmp111_ = _data_->pa_fds;
	_data_->_tmp112_ = _data_->pa_fd_a;
	gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp111_, _data_->_tmp112_);
	_data_->_tmp113_ = _data_->v6;
	_data_->_tmp114_ = _data_->pa_fds;
	g_value_set_object (_data_->_tmp113_, (GObject*) _data_->_tmp114_);
	_data_->_tmp115_ = _data_->details;
	_data_->_tmp116_ = NULL;
	_data_->_tmp116_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_POSTAL_ADDRESSES);
	_data_->_tmp117_ = g_strdup (_data_->_tmp116_);
	_data_->_tmp118_ = _data_->v6;
	_data_->v6 = NULL;
	g_hash_table_insert (_data_->_tmp115_, _data_->_tmp117_, _data_->_tmp118_);
	memset (&_data_->_tmp119_, 0, sizeof (GValue));
	g_value_init (&_data_->_tmp119_, FOLKS_TYPE_STRUCTURED_NAME);
	_data_->_tmp120_ = _data_->_tmp119_;
	_data_->_tmp121_ = _data_->_tmp120_;
	_data_->_tmp122_ = __g_value_dup0 (&_data_->_tmp121_);
	_data_->_tmp123_ = _data_->_tmp122_;
	G_IS_VALUE (&_data_->_tmp121_) ? (g_value_unset (&_data_->_tmp121_), NULL) : NULL;
	_data_->v7 = _data_->_tmp123_;
	_data_->_tmp124_ = _data_->self->priv->_family_name;
	_data_->_tmp125_ = _data_->self->priv->_given_name;
	_data_->_tmp126_ = folks_structured_name_new (_data_->_tmp124_, _data_->_tmp125_, NULL, NULL, NULL);
	_data_->sname = _data_->_tmp126_;
	_data_->_tmp127_ = _data_->v7;
	_data_->_tmp128_ = _data_->sname;
	g_value_set_object (_data_->_tmp127_, (GObject*) _data_->_tmp128_);
	_data_->_tmp129_ = _data_->details;
	_data_->_tmp130_ = NULL;
	_data_->_tmp130_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_STRUCTURED_NAME);
	_data_->_tmp131_ = g_strdup (_data_->_tmp130_);
	_data_->_tmp132_ = _data_->v7;
	_data_->v7 = NULL;
	g_hash_table_insert (_data_->_tmp129_, _data_->_tmp131_, _data_->_tmp132_);
	memset (&_data_->_tmp133_, 0, sizeof (GValue));
	g_value_init (&_data_->_tmp133_, GEE_TYPE_SET);
	_data_->_tmp134_ = _data_->_tmp133_;
	_data_->_tmp135_ = _data_->_tmp134_;
	_data_->_tmp136_ = __g_value_dup0 (&_data_->_tmp135_);
	_data_->_tmp137_ = _data_->_tmp136_;
	G_IS_VALUE (&_data_->_tmp135_) ? (g_value_unset (&_data_->_tmp135_), NULL) : NULL;
	_data_->v8 = _data_->_tmp137_;
	_data_->_tmp138_ = gee_hash_set_new (FOLKS_TYPE_NOTE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, (GHashFunc) folks_abstract_field_details_hash, (GEqualFunc) folks_abstract_field_details_equal);
	_data_->notes = _data_->_tmp138_;
	_data_->_tmp139_ = _data_->self->priv->_note;
	_data_->_tmp140_ = folks_note_field_details_new (_data_->_tmp139_, NULL, NULL);
	_data_->note = _data_->_tmp140_;
	_data_->_tmp141_ = _data_->notes;
	_data_->_tmp142_ = _data_->note;
	gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp141_, _data_->_tmp142_);
	_data_->_tmp143_ = _data_->v8;
	_data_->_tmp144_ = _data_->notes;
	g_value_set_object (_data_->_tmp143_, (GObject*) _data_->_tmp144_);
	_data_->_tmp145_ = _data_->details;
	_data_->_tmp146_ = NULL;
	_data_->_tmp146_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_NOTES);
	_data_->_tmp147_ = g_strdup (_data_->_tmp146_);
	_data_->_tmp148_ = _data_->v8;
	_data_->v8 = NULL;
	g_hash_table_insert (_data_->_tmp145_, _data_->_tmp147_, _data_->_tmp148_);
	{
		_data_->_tmp149_ = _data_->self->priv->_aggregator;
		_data_->_tmp150_ = _data_->self->priv->_pstore;
		_data_->_tmp151_ = _data_->details;
		_data_->_state_ = 1;
		folks_individual_aggregator_add_persona_from_details (_data_->_tmp149_, NULL, (FolksPersonaStore*) _data_->_tmp150_, _data_->_tmp151_, _add_persona_tests_add_persona_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp152_ = NULL;
		_data_->_tmp152_ = folks_individual_aggregator_add_persona_from_details_finish (_data_->_tmp149_, _data_->_res_, &_data_->_inner_error_);
		_data_->_tmp153_ = _data_->_tmp152_;
		_g_object_unref0 (_data_->_tmp153_);
		if (_data_->_inner_error_ != NULL) {
			if (_data_->_inner_error_->domain == FOLKS_INDIVIDUAL_AGGREGATOR_ERROR) {
				goto __catch1_folks_individual_aggregator_error;
			}
			_g_object_unref0 (_data_->note);
			_g_object_unref0 (_data_->notes);
			__vala_GValue_free0 (_data_->v8);
			_g_object_unref0 (_data_->sname);
			__vala_GValue_free0 (_data_->v7);
			_g_object_unref0 (_data_->pa_fd_a);
			_g_object_unref0 (_data_->pa_a);
			_g_object_unref0 (_data_->pa_fds);
			__vala_GValue_free0 (_data_->v6);
			_g_object_unref0 (_data_->phone_2);
			_g_object_unref0 (_data_->phone_1);
			_g_object_unref0 (_data_->phones);
			__vala_GValue_free0 (_data_->v5);
			_g_object_unref0 (_data_->im_fds);
			__vala_GValue_free0 (_data_->v4);
			_g_object_unref0 (_data_->avatar);
			__vala_GValue_free0 (_data_->v3);
			_g_object_unref0 (_data_->email_1);
			_g_object_unref0 (_data_->emails);
			__vala_GValue_free0 (_data_->v2);
			__vala_GValue_free0 (_data_->v1);
			_g_hash_table_unref0 (_data_->details);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	goto __finally1;
	__catch1_folks_individual_aggregator_error:
	{
		_data_->e = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp154_ = _data_->e;
		_data_->_tmp155_ = _data_->_tmp154_->message;
		g_warning ("add-persona.vala:242: [AddPersonaError] add_persona_from_details: %s\n", _data_->_tmp155_);
		_g_error_free0 (_data_->e);
	}
	__finally1:
	if (_data_->_inner_error_ != NULL) {
		_g_object_unref0 (_data_->note);
		_g_object_unref0 (_data_->notes);
		__vala_GValue_free0 (_data_->v8);
		_g_object_unref0 (_data_->sname);
		__vala_GValue_free0 (_data_->v7);
		_g_object_unref0 (_data_->pa_fd_a);
		_g_object_unref0 (_data_->pa_a);
		_g_object_unref0 (_data_->pa_fds);
		__vala_GValue_free0 (_data_->v6);
		_g_object_unref0 (_data_->phone_2);
		_g_object_unref0 (_data_->phone_1);
		_g_object_unref0 (_data_->phones);
		__vala_GValue_free0 (_data_->v5);
		_g_object_unref0 (_data_->im_fds);
		__vala_GValue_free0 (_data_->v4);
		_g_object_unref0 (_data_->avatar);
		__vala_GValue_free0 (_data_->v3);
		_g_object_unref0 (_data_->email_1);
		_g_object_unref0 (_data_->emails);
		__vala_GValue_free0 (_data_->v2);
		__vala_GValue_free0 (_data_->v1);
		_g_hash_table_unref0 (_data_->details);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_g_object_unref0 (_data_->note);
	_g_object_unref0 (_data_->notes);
	__vala_GValue_free0 (_data_->v8);
	_g_object_unref0 (_data_->sname);
	__vala_GValue_free0 (_data_->v7);
	_g_object_unref0 (_data_->pa_fd_a);
	_g_object_unref0 (_data_->pa_a);
	_g_object_unref0 (_data_->pa_fds);
	__vala_GValue_free0 (_data_->v6);
	_g_object_unref0 (_data_->phone_2);
	_g_object_unref0 (_data_->phone_1);
	_g_object_unref0 (_data_->phones);
	__vala_GValue_free0 (_data_->v5);
	_g_object_unref0 (_data_->im_fds);
	__vala_GValue_free0 (_data_->v4);
	_g_object_unref0 (_data_->avatar);
	__vala_GValue_free0 (_data_->v3);
	_g_object_unref0 (_data_->email_1);
	_g_object_unref0 (_data_->emails);
	__vala_GValue_free0 (_data_->v2);
	__vala_GValue_free0 (_data_->v1);
	_g_hash_table_unref0 (_data_->details);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void _add_persona_tests_individuals_changed_cb (AddPersonaTests* self, GeeSet* added, GeeSet* removed, const gchar* message, FolksPersona* actor, FolksGroupDetailsChangeReason reason) {
	guint num_replaces;
	GeeSet* _tmp8_;
	gint _tmp9_;
	gint _tmp10_;
	guint _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (added != NULL);
	g_return_if_fail (removed != NULL);
	num_replaces = (guint) 0;
	{
		GeeSet* _tmp0_;
		GeeIterator* _tmp1_ = NULL;
		GeeIterator* _i_it;
		_tmp0_ = added;
		_tmp1_ = gee_iterable_iterator ((GeeIterable*) _tmp0_);
		_i_it = _tmp1_;
		while (TRUE) {
			GeeIterator* _tmp2_;
			gboolean _tmp3_ = FALSE;
			GeeIterator* _tmp4_;
			gpointer _tmp5_ = NULL;
			FolksIndividual* i;
			FolksIndividual* _tmp6_;
			guint _tmp7_ = 0U;
			_tmp2_ = _i_it;
			_tmp3_ = gee_iterator_next (_tmp2_);
			if (!_tmp3_) {
				break;
			}
			_tmp4_ = _i_it;
			_tmp5_ = gee_iterator_get (_tmp4_);
			i = (FolksIndividual*) _tmp5_;
			_tmp6_ = i;
			_tmp7_ = _add_persona_tests_track_individual (self, _tmp6_);
			num_replaces = _tmp7_;
			_g_object_unref0 (i);
		}
		_g_object_unref0 (_i_it);
	}
	_tmp8_ = removed;
	_tmp9_ = gee_collection_get_size ((GeeCollection*) _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = num_replaces;
	g_assert (((guint) _tmp10_) <= _tmp11_);
}


static void __add_persona_tests_notify_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	_add_persona_tests_notify_cb (self, _sender, pspec);
}


static guint _add_persona_tests_track_individual (AddPersonaTests* self, FolksIndividual* i) {
	guint result = 0U;
	guint retval;
	FolksIndividual* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, 0U);
	g_return_val_if_fail (i != NULL, 0U);
	retval = (guint) 0;
	_tmp0_ = i;
	_tmp1_ = folks_individual_get_is_user (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == FALSE) {
		gboolean _tmp3_ = FALSE;
		FolksIndividual* _tmp4_;
		gboolean _tmp11_;
		FolksIndividual* _tmp12_;
		FolksIndividual* _tmp38_;
		FolksIndividual* _tmp39_;
		guint _tmp40_;
		FolksIndividual* _tmp41_;
		FolksIndividual* _tmp42_;
		FolksIndividual* _tmp43_;
		FolksIndividual* _tmp44_;
		FolksIndividual* _tmp45_;
		FolksIndividual* _tmp46_;
		FolksIndividual* _tmp47_;
		FolksIndividual* _tmp48_;
		FolksIndividual* _tmp49_;
		_tmp4_ = self->priv->_individual_received;
		if (_tmp4_ == NULL) {
			_tmp3_ = TRUE;
		} else {
			FolksIndividual* _tmp5_;
			const gchar* _tmp6_;
			const gchar* _tmp7_;
			FolksIndividual* _tmp8_;
			const gchar* _tmp9_;
			const gchar* _tmp10_;
			_tmp5_ = self->priv->_individual_received;
			_tmp6_ = folks_individual_get_id (_tmp5_);
			_tmp7_ = _tmp6_;
			_tmp8_ = i;
			_tmp9_ = folks_individual_get_id (_tmp8_);
			_tmp10_ = _tmp9_;
			_tmp3_ = g_strcmp0 (_tmp7_, _tmp10_) == 0;
		}
		_tmp11_ = _tmp3_;
		g_assert (_tmp11_);
		_tmp12_ = self->priv->_individual_received;
		if (_tmp12_ != NULL) {
			FolksIndividual* _tmp13_;
			guint _tmp14_ = 0U;
			GQuark _tmp15_ = 0U;
			FolksIndividual* _tmp16_;
			guint _tmp17_ = 0U;
			GQuark _tmp18_ = 0U;
			FolksIndividual* _tmp19_;
			guint _tmp20_ = 0U;
			GQuark _tmp21_ = 0U;
			FolksIndividual* _tmp22_;
			guint _tmp23_ = 0U;
			GQuark _tmp24_ = 0U;
			FolksIndividual* _tmp25_;
			guint _tmp26_ = 0U;
			GQuark _tmp27_ = 0U;
			FolksIndividual* _tmp28_;
			guint _tmp29_ = 0U;
			GQuark _tmp30_ = 0U;
			FolksIndividual* _tmp31_;
			guint _tmp32_ = 0U;
			GQuark _tmp33_ = 0U;
			FolksIndividual* _tmp34_;
			guint _tmp35_ = 0U;
			GQuark _tmp36_ = 0U;
			GHashTable* _tmp37_;
			_tmp13_ = i;
			g_signal_parse_name ("notify::full-name", G_TYPE_OBJECT, &_tmp14_, &_tmp15_, TRUE);
			g_signal_handlers_disconnect_matched ((GObject*) _tmp13_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp14_, _tmp15_, NULL, (GCallback) __add_persona_tests_notify_cb_g_object_notify, self);
			_tmp16_ = i;
			g_signal_parse_name ("notify::email-addresses", G_TYPE_OBJECT, &_tmp17_, &_tmp18_, TRUE);
			g_signal_handlers_disconnect_matched ((GObject*) _tmp16_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp17_, _tmp18_, NULL, (GCallback) __add_persona_tests_notify_cb_g_object_notify, self);
			_tmp19_ = i;
			g_signal_parse_name ("notify::avatar", G_TYPE_OBJECT, &_tmp20_, &_tmp21_, TRUE);
			g_signal_handlers_disconnect_matched ((GObject*) _tmp19_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp20_, _tmp21_, NULL, (GCallback) __add_persona_tests_notify_cb_g_object_notify, self);
			_tmp22_ = i;
			g_signal_parse_name ("notify::im-addresses", G_TYPE_OBJECT, &_tmp23_, &_tmp24_, TRUE);
			g_signal_handlers_disconnect_matched ((GObject*) _tmp22_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp23_, _tmp24_, NULL, (GCallback) __add_persona_tests_notify_cb_g_object_notify, self);
			_tmp25_ = i;
			g_signal_parse_name ("notify::phone-numbers", G_TYPE_OBJECT, &_tmp26_, &_tmp27_, TRUE);
			g_signal_handlers_disconnect_matched ((GObject*) _tmp25_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp26_, _tmp27_, NULL, (GCallback) __add_persona_tests_notify_cb_g_object_notify, self);
			_tmp28_ = i;
			g_signal_parse_name ("notify::postal-addresses", G_TYPE_OBJECT, &_tmp29_, &_tmp30_, TRUE);
			g_signal_handlers_disconnect_matched ((GObject*) _tmp28_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp29_, _tmp30_, NULL, (GCallback) __add_persona_tests_notify_cb_g_object_notify, self);
			_tmp31_ = i;
			g_signal_parse_name ("notify::structured-name", G_TYPE_OBJECT, &_tmp32_, &_tmp33_, TRUE);
			g_signal_handlers_disconnect_matched ((GObject*) _tmp31_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp32_, _tmp33_, NULL, (GCallback) __add_persona_tests_notify_cb_g_object_notify, self);
			_tmp34_ = i;
			g_signal_parse_name ("notify::notes", G_TYPE_OBJECT, &_tmp35_, &_tmp36_, TRUE);
			g_signal_handlers_disconnect_matched ((GObject*) _tmp34_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp35_, _tmp36_, NULL, (GCallback) __add_persona_tests_notify_cb_g_object_notify, self);
			_tmp37_ = self->priv->_properties_found;
			g_hash_table_remove_all (_tmp37_);
		}
		_tmp38_ = i;
		_tmp39_ = _g_object_ref0 (_tmp38_);
		_g_object_unref0 (self->priv->_individual_received);
		self->priv->_individual_received = _tmp39_;
		_tmp40_ = retval;
		retval = _tmp40_ + 1;
		_tmp41_ = i;
		g_signal_connect_object ((GObject*) _tmp41_, "notify::full-name", (GCallback) __add_persona_tests_notify_cb_g_object_notify, self, 0);
		_tmp42_ = i;
		g_signal_connect_object ((GObject*) _tmp42_, "notify::email-addresses", (GCallback) __add_persona_tests_notify_cb_g_object_notify, self, 0);
		_tmp43_ = i;
		g_signal_connect_object ((GObject*) _tmp43_, "notify::avatar", (GCallback) __add_persona_tests_notify_cb_g_object_notify, self, 0);
		_tmp44_ = i;
		g_signal_connect_object ((GObject*) _tmp44_, "notify::im-addresses", (GCallback) __add_persona_tests_notify_cb_g_object_notify, self, 0);
		_tmp45_ = i;
		g_signal_connect_object ((GObject*) _tmp45_, "notify::phone-numbers", (GCallback) __add_persona_tests_notify_cb_g_object_notify, self, 0);
		_tmp46_ = i;
		g_signal_connect_object ((GObject*) _tmp46_, "notify::postal-addresses", (GCallback) __add_persona_tests_notify_cb_g_object_notify, self, 0);
		_tmp47_ = i;
		g_signal_connect_object ((GObject*) _tmp47_, "notify::structured-name", (GCallback) __add_persona_tests_notify_cb_g_object_notify, self, 0);
		_tmp48_ = i;
		g_signal_connect_object ((GObject*) _tmp48_, "notify::notes", (GCallback) __add_persona_tests_notify_cb_g_object_notify, self, 0);
		_tmp49_ = i;
		_add_persona_tests_check_properties (self, _tmp49_);
	}
	result = retval;
	return result;
}


static void _add_persona_tests_notify_cb (AddPersonaTests* self, GObject* individual_obj, GParamSpec* ps) {
	GObject* _tmp0_;
	FolksIndividual* _tmp1_;
	FolksIndividual* i;
	FolksIndividual* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (individual_obj != NULL);
	g_return_if_fail (ps != NULL);
	_tmp0_ = individual_obj;
	_tmp1_ = _g_object_ref0 (FOLKS_INDIVIDUAL (_tmp0_));
	i = _tmp1_;
	_tmp2_ = i;
	_add_persona_tests_check_properties (self, _tmp2_);
	_g_object_unref0 (i);
}


static void _add_persona_tests_notify_pstore_cb (AddPersonaTests* self, GObject* _pstore, GParamSpec* ps) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (_pstore != NULL);
	g_return_if_fail (ps != NULL);
	_add_persona_tests_try_to_add (self);
}


static void _add_persona_tests_try_to_add (AddPersonaTests* self) {
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	{
		gboolean _tmp0_;
		_tmp0_ = self->priv->_added_persona;
		g_static_rec_mutex_lock (&self->priv->__lock__added_persona);
		{
			gboolean _tmp1_ = FALSE;
			EdsfPersonaStore* _tmp2_;
			gboolean _tmp3_;
			gboolean _tmp4_;
			gboolean _tmp6_;
			_tmp2_ = self->priv->_pstore;
			_tmp3_ = folks_persona_store_get_is_prepared ((FolksPersonaStore*) _tmp2_);
			_tmp4_ = _tmp3_;
			if (_tmp4_) {
				gboolean _tmp5_;
				_tmp5_ = self->priv->_added_persona;
				_tmp1_ = _tmp5_ == FALSE;
			} else {
				_tmp1_ = FALSE;
			}
			_tmp6_ = _tmp1_;
			if (_tmp6_) {
				self->priv->_added_persona = TRUE;
				_add_persona_tests_add_persona (self, NULL, NULL);
			}
		}
		__finally2:
		{
			gboolean _tmp7_;
			_tmp7_ = self->priv->_added_persona;
			g_static_rec_mutex_unlock (&self->priv->__lock__added_persona);
		}
		if (_inner_error_ != NULL) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


static void _add_persona_tests_check_properties (AddPersonaTests* self, FolksIndividual* i) {
	FolksIndividual* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	FolksIndividual* _tmp20_;
	GLoadableIcon* _tmp21_;
	GLoadableIcon* _tmp22_;
	gboolean _tmp114_ = FALSE;
	gboolean _tmp115_ = FALSE;
	FolksIndividual* _tmp116_;
	FolksStructuredName* _tmp117_;
	FolksStructuredName* _tmp118_;
	gboolean _tmp125_;
	gboolean _tmp132_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (i != NULL);
	_tmp0_ = i;
	_tmp1_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_persona_fullname;
	if (g_strcmp0 (_tmp2_, _tmp3_) == 0) {
		GHashTable* _tmp4_;
		gchar* _tmp5_;
		_tmp4_ = self->priv->_properties_found;
		_tmp5_ = g_strdup ("full_name");
		g_hash_table_replace (_tmp4_, _tmp5_, GINT_TO_POINTER (TRUE));
	}
	{
		FolksIndividual* _tmp6_;
		GeeSet* _tmp7_;
		GeeSet* _tmp8_;
		GeeIterator* _tmp9_ = NULL;
		GeeIterator* _e_it;
		_tmp6_ = i;
		_tmp7_ = folks_email_details_get_email_addresses ((FolksEmailDetails*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = gee_iterable_iterator ((GeeIterable*) _tmp8_);
		_e_it = _tmp9_;
		while (TRUE) {
			GeeIterator* _tmp10_;
			gboolean _tmp11_ = FALSE;
			GeeIterator* _tmp12_;
			gpointer _tmp13_ = NULL;
			FolksEmailFieldDetails* e;
			FolksEmailFieldDetails* _tmp14_;
			gconstpointer _tmp15_;
			const gchar* _tmp16_;
			const gchar* _tmp17_;
			_tmp10_ = _e_it;
			_tmp11_ = gee_iterator_next (_tmp10_);
			if (!_tmp11_) {
				break;
			}
			_tmp12_ = _e_it;
			_tmp13_ = gee_iterator_get (_tmp12_);
			e = (FolksEmailFieldDetails*) _tmp13_;
			_tmp14_ = e;
			_tmp15_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = self->priv->_email_1;
			if (g_strcmp0 ((const gchar*) _tmp16_, _tmp17_) == 0) {
				GHashTable* _tmp18_;
				gchar* _tmp19_;
				_tmp18_ = self->priv->_properties_found;
				_tmp19_ = g_strdup ("email-1");
				g_hash_table_replace (_tmp18_, _tmp19_, GINT_TO_POINTER (TRUE));
			}
			_g_object_unref0 (e);
		}
		_g_object_unref0 (_e_it);
	}
	_tmp20_ = i;
	_tmp21_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp20_);
	_tmp22_ = _tmp21_;
	if (_tmp22_ != NULL) {
		const gchar* _tmp23_;
		GFile* _tmp24_ = NULL;
		GFile* _tmp25_;
		GFileIcon* _tmp26_;
		GFileIcon* _tmp27_;
		GFileIcon* b;
		GFileIcon* _tmp28_;
		FolksIndividual* _tmp29_;
		GLoadableIcon* _tmp30_;
		GLoadableIcon* _tmp31_;
		gboolean _tmp32_ = FALSE;
		_tmp23_ = self->priv->_avatar_path;
		_tmp24_ = g_file_new_for_path (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = (GFileIcon*) g_file_icon_new (_tmp25_);
		_tmp27_ = _tmp26_;
		_g_object_unref0 (_tmp25_);
		b = _tmp27_;
		_tmp28_ = b;
		_tmp29_ = i;
		_tmp30_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp29_);
		_tmp31_ = _tmp30_;
		_tmp32_ = g_icon_equal ((GIcon*) _tmp28_, (GIcon*) _tmp31_);
		if (_tmp32_ == TRUE) {
			GHashTable* _tmp33_;
			gchar* _tmp34_;
			_tmp33_ = self->priv->_properties_found;
			_tmp34_ = g_strdup ("avatar");
			g_hash_table_replace (_tmp33_, _tmp34_, GINT_TO_POINTER (TRUE));
		}
		_g_object_unref0 (b);
	}
	{
		FolksIndividual* _tmp35_;
		GeeMultiMap* _tmp36_;
		GeeMultiMap* _tmp37_;
		GeeSet* _tmp38_ = NULL;
		GeeSet* _tmp39_;
		GeeIterator* _tmp40_ = NULL;
		GeeIterator* _tmp41_;
		GeeIterator* _proto_it;
		_tmp35_ = i;
		_tmp36_ = folks_im_details_get_im_addresses ((FolksImDetails*) _tmp35_);
		_tmp37_ = _tmp36_;
		_tmp38_ = gee_multi_map_get_keys (_tmp37_);
		_tmp39_ = _tmp38_;
		_tmp40_ = gee_iterable_iterator ((GeeIterable*) _tmp39_);
		_tmp41_ = _tmp40_;
		_g_object_unref0 (_tmp39_);
		_proto_it = _tmp41_;
		while (TRUE) {
			GeeIterator* _tmp42_;
			gboolean _tmp43_ = FALSE;
			GeeIterator* _tmp44_;
			gpointer _tmp45_ = NULL;
			gchar* proto;
			FolksIndividual* _tmp46_;
			GeeMultiMap* _tmp47_;
			GeeMultiMap* _tmp48_;
			const gchar* _tmp49_;
			GeeCollection* _tmp50_ = NULL;
			GeeCollection* im_fds;
			_tmp42_ = _proto_it;
			_tmp43_ = gee_iterator_next (_tmp42_);
			if (!_tmp43_) {
				break;
			}
			_tmp44_ = _proto_it;
			_tmp45_ = gee_iterator_get (_tmp44_);
			proto = (gchar*) _tmp45_;
			_tmp46_ = i;
			_tmp47_ = folks_im_details_get_im_addresses ((FolksImDetails*) _tmp46_);
			_tmp48_ = _tmp47_;
			_tmp49_ = proto;
			_tmp50_ = gee_multi_map_get (_tmp48_, _tmp49_);
			im_fds = _tmp50_;
			{
				GeeCollection* _tmp51_;
				GeeIterator* _tmp52_ = NULL;
				GeeIterator* _im_fd_it;
				_tmp51_ = im_fds;
				_tmp52_ = gee_iterable_iterator ((GeeIterable*) _tmp51_);
				_im_fd_it = _tmp52_;
				while (TRUE) {
					GeeIterator* _tmp53_;
					gboolean _tmp54_ = FALSE;
					GeeIterator* _tmp55_;
					gpointer _tmp56_ = NULL;
					FolksImFieldDetails* im_fd;
					FolksImFieldDetails* _tmp57_;
					gconstpointer _tmp58_;
					const gchar* _tmp59_;
					const gchar* _tmp60_;
					_tmp53_ = _im_fd_it;
					_tmp54_ = gee_iterator_next (_tmp53_);
					if (!_tmp54_) {
						break;
					}
					_tmp55_ = _im_fd_it;
					_tmp56_ = gee_iterator_get (_tmp55_);
					im_fd = (FolksImFieldDetails*) _tmp56_;
					_tmp57_ = im_fd;
					_tmp58_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp57_);
					_tmp59_ = _tmp58_;
					_tmp60_ = self->priv->_im_addr_1;
					if (g_strcmp0 ((const gchar*) _tmp59_, _tmp60_) == 0) {
						GHashTable* _tmp61_;
						gchar* _tmp62_;
						_tmp61_ = self->priv->_properties_found;
						_tmp62_ = g_strdup ("im-addr-1");
						g_hash_table_replace (_tmp61_, _tmp62_, GINT_TO_POINTER (TRUE));
					} else {
						FolksImFieldDetails* _tmp63_;
						gconstpointer _tmp64_;
						const gchar* _tmp65_;
						const gchar* _tmp66_;
						_tmp63_ = im_fd;
						_tmp64_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp63_);
						_tmp65_ = _tmp64_;
						_tmp66_ = self->priv->_im_addr_2;
						if (g_strcmp0 ((const gchar*) _tmp65_, _tmp66_) == 0) {
							GHashTable* _tmp67_;
							gchar* _tmp68_;
							_tmp67_ = self->priv->_properties_found;
							_tmp68_ = g_strdup ("im-addr-2");
							g_hash_table_replace (_tmp67_, _tmp68_, GINT_TO_POINTER (TRUE));
						}
					}
					_g_object_unref0 (im_fd);
				}
				_g_object_unref0 (_im_fd_it);
			}
			_g_object_unref0 (im_fds);
			_g_free0 (proto);
		}
		_g_object_unref0 (_proto_it);
	}
	{
		FolksIndividual* _tmp69_;
		GeeSet* _tmp70_;
		GeeSet* _tmp71_;
		GeeIterator* _tmp72_ = NULL;
		GeeIterator* _phone_fd_it;
		_tmp69_ = i;
		_tmp70_ = folks_phone_details_get_phone_numbers ((FolksPhoneDetails*) _tmp69_);
		_tmp71_ = _tmp70_;
		_tmp72_ = gee_iterable_iterator ((GeeIterable*) _tmp71_);
		_phone_fd_it = _tmp72_;
		while (TRUE) {
			GeeIterator* _tmp73_;
			gboolean _tmp74_ = FALSE;
			GeeIterator* _tmp75_;
			gpointer _tmp76_ = NULL;
			FolksPhoneFieldDetails* phone_fd;
			FolksPhoneFieldDetails* _tmp77_;
			const gchar* _tmp78_;
			FolksPhoneFieldDetails* _tmp79_;
			FolksPhoneFieldDetails* _tmp80_;
			gboolean _tmp81_ = FALSE;
			gboolean _tmp82_;
			_tmp73_ = _phone_fd_it;
			_tmp74_ = gee_iterator_next (_tmp73_);
			if (!_tmp74_) {
				break;
			}
			_tmp75_ = _phone_fd_it;
			_tmp76_ = gee_iterator_get (_tmp75_);
			phone_fd = (FolksPhoneFieldDetails*) _tmp76_;
			_tmp77_ = phone_fd;
			_tmp78_ = self->priv->_phone_1;
			_tmp79_ = folks_phone_field_details_new (_tmp78_, NULL);
			_tmp80_ = _tmp79_;
			_tmp81_ = folks_abstract_field_details_equal ((FolksAbstractFieldDetails*) _tmp77_, (FolksAbstractFieldDetails*) _tmp80_);
			_tmp82_ = _tmp81_;
			_g_object_unref0 (_tmp80_);
			if (_tmp82_) {
				GHashTable* _tmp83_;
				gchar* _tmp84_;
				_tmp83_ = self->priv->_properties_found;
				_tmp84_ = g_strdup ("phone-1");
				g_hash_table_replace (_tmp83_, _tmp84_, GINT_TO_POINTER (TRUE));
			} else {
				FolksPhoneFieldDetails* _tmp85_;
				const gchar* _tmp86_;
				FolksPhoneFieldDetails* _tmp87_;
				FolksPhoneFieldDetails* _tmp88_;
				gboolean _tmp89_ = FALSE;
				gboolean _tmp90_;
				_tmp85_ = phone_fd;
				_tmp86_ = self->priv->_phone_2;
				_tmp87_ = folks_phone_field_details_new (_tmp86_, NULL);
				_tmp88_ = _tmp87_;
				_tmp89_ = folks_abstract_field_details_equal ((FolksAbstractFieldDetails*) _tmp85_, (FolksAbstractFieldDetails*) _tmp88_);
				_tmp90_ = _tmp89_;
				_g_object_unref0 (_tmp88_);
				if (_tmp90_) {
					GHashTable* _tmp91_;
					gchar* _tmp92_;
					_tmp91_ = self->priv->_properties_found;
					_tmp92_ = g_strdup ("phone-2");
					g_hash_table_replace (_tmp91_, _tmp92_, GINT_TO_POINTER (TRUE));
				}
			}
			_g_object_unref0 (phone_fd);
		}
		_g_object_unref0 (_phone_fd_it);
	}
	{
		FolksIndividual* _tmp93_;
		GeeSet* _tmp94_;
		GeeSet* _tmp95_;
		GeeIterator* _tmp96_ = NULL;
		GeeIterator* _pa_fd_it;
		_tmp93_ = i;
		_tmp94_ = folks_postal_address_details_get_postal_addresses ((FolksPostalAddressDetails*) _tmp93_);
		_tmp95_ = _tmp94_;
		_tmp96_ = gee_iterable_iterator ((GeeIterable*) _tmp95_);
		_pa_fd_it = _tmp96_;
		while (TRUE) {
			GeeIterator* _tmp97_;
			gboolean _tmp98_ = FALSE;
			GeeIterator* _tmp99_;
			gpointer _tmp100_ = NULL;
			FolksPostalAddressFieldDetails* pa_fd;
			FolksPostalAddressFieldDetails* _tmp101_;
			gconstpointer _tmp102_;
			FolksPostalAddress* _tmp103_;
			FolksPostalAddressFieldDetails* _tmp104_;
			gconstpointer _tmp105_;
			FolksPostalAddress* _tmp106_;
			const gchar* _tmp107_;
			const gchar* _tmp108_;
			FolksPostalAddressFieldDetails* _tmp109_;
			FolksPostalAddressFieldDetails* _tmp110_;
			gboolean _tmp111_ = FALSE;
			_tmp97_ = _pa_fd_it;
			_tmp98_ = gee_iterator_next (_tmp97_);
			if (!_tmp98_) {
				break;
			}
			_tmp99_ = _pa_fd_it;
			_tmp100_ = gee_iterator_get (_tmp99_);
			pa_fd = (FolksPostalAddressFieldDetails*) _tmp100_;
			_tmp101_ = self->priv->_address;
			_tmp102_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp101_);
			_tmp103_ = _tmp102_;
			_tmp104_ = pa_fd;
			_tmp105_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp104_);
			_tmp106_ = _tmp105_;
			_tmp107_ = folks_postal_address_get_uid ((FolksPostalAddress*) _tmp106_);
			_tmp108_ = _tmp107_;
			folks_postal_address_set_uid ((FolksPostalAddress*) _tmp103_, _tmp108_);
			_tmp109_ = pa_fd;
			_tmp110_ = self->priv->_address;
			_tmp111_ = folks_abstract_field_details_equal ((FolksAbstractFieldDetails*) _tmp109_, (FolksAbstractFieldDetails*) _tmp110_);
			if (_tmp111_) {
				GHashTable* _tmp112_;
				gchar* _tmp113_;
				_tmp112_ = self->priv->_properties_found;
				_tmp113_ = g_strdup ("postal-address-1");
				g_hash_table_replace (_tmp112_, _tmp113_, GINT_TO_POINTER (TRUE));
			}
			_g_object_unref0 (pa_fd);
		}
		_g_object_unref0 (_pa_fd_it);
	}
	_tmp116_ = i;
	_tmp117_ = folks_name_details_get_structured_name ((FolksNameDetails*) _tmp116_);
	_tmp118_ = _tmp117_;
	if (_tmp118_ != NULL) {
		FolksIndividual* _tmp119_;
		FolksStructuredName* _tmp120_;
		FolksStructuredName* _tmp121_;
		const gchar* _tmp122_;
		const gchar* _tmp123_;
		const gchar* _tmp124_;
		_tmp119_ = i;
		_tmp120_ = folks_name_details_get_structured_name ((FolksNameDetails*) _tmp119_);
		_tmp121_ = _tmp120_;
		_tmp122_ = folks_structured_name_get_family_name (_tmp121_);
		_tmp123_ = _tmp122_;
		_tmp124_ = self->priv->_family_name;
		_tmp115_ = g_strcmp0 (_tmp123_, _tmp124_) == 0;
	} else {
		_tmp115_ = FALSE;
	}
	_tmp125_ = _tmp115_;
	if (_tmp125_) {
		FolksIndividual* _tmp126_;
		FolksStructuredName* _tmp127_;
		FolksStructuredName* _tmp128_;
		const gchar* _tmp129_;
		const gchar* _tmp130_;
		const gchar* _tmp131_;
		_tmp126_ = i;
		_tmp127_ = folks_name_details_get_structured_name ((FolksNameDetails*) _tmp126_);
		_tmp128_ = _tmp127_;
		_tmp129_ = folks_structured_name_get_given_name (_tmp128_);
		_tmp130_ = _tmp129_;
		_tmp131_ = self->priv->_given_name;
		_tmp114_ = g_strcmp0 (_tmp130_, _tmp131_) == 0;
	} else {
		_tmp114_ = FALSE;
	}
	_tmp132_ = _tmp114_;
	if (_tmp132_) {
		GHashTable* _tmp133_;
		gchar* _tmp134_;
		_tmp133_ = self->priv->_properties_found;
		_tmp134_ = g_strdup ("structured_name");
		g_hash_table_replace (_tmp133_, _tmp134_, GINT_TO_POINTER (TRUE));
	}
	{
		FolksIndividual* _tmp135_;
		GeeSet* _tmp136_;
		GeeSet* _tmp137_;
		GeeIterator* _tmp138_ = NULL;
		GeeIterator* _note_it;
		_tmp135_ = i;
		_tmp136_ = folks_note_details_get_notes ((FolksNoteDetails*) _tmp135_);
		_tmp137_ = _tmp136_;
		_tmp138_ = gee_iterable_iterator ((GeeIterable*) _tmp137_);
		_note_it = _tmp138_;
		while (TRUE) {
			GeeIterator* _tmp139_;
			gboolean _tmp140_ = FALSE;
			GeeIterator* _tmp141_;
			gpointer _tmp142_ = NULL;
			FolksNoteFieldDetails* note;
			FolksNoteFieldDetails* _tmp143_;
			const gchar* _tmp144_;
			FolksNoteFieldDetails* _tmp145_;
			FolksNoteFieldDetails* _tmp146_;
			gboolean _tmp147_ = FALSE;
			gboolean _tmp148_;
			_tmp139_ = _note_it;
			_tmp140_ = gee_iterator_next (_tmp139_);
			if (!_tmp140_) {
				break;
			}
			_tmp141_ = _note_it;
			_tmp142_ = gee_iterator_get (_tmp141_);
			note = (FolksNoteFieldDetails*) _tmp142_;
			_tmp143_ = note;
			_tmp144_ = self->priv->_note;
			_tmp145_ = folks_note_field_details_new (_tmp144_, NULL, NULL);
			_tmp146_ = _tmp145_;
			_tmp147_ = folks_abstract_field_details_equal ((FolksAbstractFieldDetails*) _tmp143_, (FolksAbstractFieldDetails*) _tmp146_);
			_tmp148_ = _tmp147_;
			_g_object_unref0 (_tmp146_);
			if (_tmp148_) {
				GHashTable* _tmp149_;
				gchar* _tmp150_;
				_tmp149_ = self->priv->_properties_found;
				_tmp150_ = g_strdup ("note");
				g_hash_table_replace (_tmp149_, _tmp150_, GINT_TO_POINTER (TRUE));
				_g_object_unref0 (note);
				break;
			}
			_g_object_unref0 (note);
		}
		_g_object_unref0 (_note_it);
	}
	_add_persona_tests_exit_if_all_properties_found (self);
}


static void _add_persona_tests_exit_if_all_properties_found (AddPersonaTests* self) {
	GHashTable* _tmp0_;
	GList* _tmp1_ = NULL;
	GMainLoop* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_properties_found;
	_tmp1_ = g_hash_table_get_keys (_tmp0_);
	{
		GList* k_collection = NULL;
		GList* k_it = NULL;
		k_collection = _tmp1_;
		for (k_it = k_collection; k_it != NULL; k_it = k_it->next) {
			const gchar* k = NULL;
			k = (const gchar*) k_it->data;
			{
				GHashTable* _tmp2_;
				const gchar* _tmp3_;
				gconstpointer _tmp4_ = NULL;
				gboolean v;
				gboolean _tmp5_;
				_tmp2_ = self->priv->_properties_found;
				_tmp3_ = k;
				_tmp4_ = g_hash_table_lookup (_tmp2_, _tmp3_);
				v = GPOINTER_TO_INT (_tmp4_);
				_tmp5_ = v;
				if (_tmp5_ == FALSE) {
					_g_list_free0 (k_collection);
					return;
				}
			}
		}
		_g_list_free0 (k_collection);
	}
	_tmp6_ = self->priv->_main_loop;
	g_main_loop_quit (_tmp6_);
}


static void add_persona_tests_class_init (AddPersonaTestsClass * klass) {
	add_persona_tests_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (AddPersonaTestsPrivate));
	FOLKS_TEST_CASE_CLASS (klass)->set_up = add_persona_tests_real_set_up;
	FOLKS_TEST_CASE_CLASS (klass)->tear_down = add_persona_tests_real_tear_down;
	G_OBJECT_CLASS (klass)->finalize = add_persona_tests_finalize;
}


static void add_persona_tests_instance_init (AddPersonaTests * self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	self->priv = ADD_PERSONA_TESTS_GET_PRIVATE (self);
	g_static_rec_mutex_init (&self->priv->__lock__added_persona);
	self->priv->_added_persona = FALSE;
	_tmp0_ = g_strdup ("12345");
	self->priv->_po_box = _tmp0_;
	_tmp1_ = g_strdup ("locality");
	self->priv->_locality = _tmp1_;
	_tmp2_ = g_strdup ("code");
	self->priv->_postal_code = _tmp2_;
	_tmp3_ = g_strdup ("some street");
	self->priv->_street = _tmp3_;
	_tmp4_ = g_strdup ("some extension");
	self->priv->_extension = _tmp4_;
	_tmp5_ = g_strdup ("some country");
	self->priv->_country = _tmp5_;
	_tmp6_ = g_strdup ("some region");
	self->priv->_region = _tmp6_;
	_tmp7_ = g_strdup ("This is a note.");
	self->priv->_note = _tmp7_;
}


static void add_persona_tests_finalize (GObject* obj) {
	AddPersonaTests * self;
	self = ADD_PERSONA_TESTS (obj);
	_g_main_loop_unref0 (self->priv->_main_loop);
	_eds_test_backend_unref0 (self->priv->_eds_backend);
	_g_object_unref0 (self->priv->_aggregator);
	_g_free0 (self->priv->_persona_fullname);
	_g_free0 (self->priv->_email_1);
	_g_object_unref0 (self->priv->_pstore);
	g_static_rec_mutex_free (&self->priv->__lock__added_persona);
	_g_hash_table_unref0 (self->priv->_properties_found);
	_g_free0 (self->priv->_avatar_path);
	_g_free0 (self->priv->_im_addr_1);
	_g_free0 (self->priv->_im_addr_2);
	_g_free0 (self->priv->_phone_1);
	_g_free0 (self->priv->_phone_2);
	_g_object_unref0 (self->priv->_address);
	_g_free0 (self->priv->_po_box);
	_g_free0 (self->priv->_locality);
	_g_free0 (self->priv->_postal_code);
	_g_free0 (self->priv->_street);
	_g_free0 (self->priv->_extension);
	_g_free0 (self->priv->_country);
	_g_free0 (self->priv->_region);
	_g_free0 (self->priv->_family_name);
	_g_free0 (self->priv->_given_name);
	_g_free0 (self->priv->_note);
	_g_object_unref0 (self->priv->_individual_received);
	G_OBJECT_CLASS (add_persona_tests_parent_class)->finalize (obj);
}


GType add_persona_tests_get_type (void) {
	static volatile gsize add_persona_tests_type_id__volatile = 0;
	if (g_once_init_enter (&add_persona_tests_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AddPersonaTestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) add_persona_tests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AddPersonaTests), 0, (GInstanceInitFunc) add_persona_tests_instance_init, NULL };
		GType add_persona_tests_type_id;
		add_persona_tests_type_id = g_type_register_static (FOLKS_TYPE_TEST_CASE, "AddPersonaTests", &g_define_type_info, 0);
		g_once_init_leave (&add_persona_tests_type_id__volatile, add_persona_tests_type_id);
	}
	return add_persona_tests_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	GTestSuite* _tmp0_ = NULL;
	GTestSuite* root;
	GTestSuite* _tmp1_;
	AddPersonaTests* _tmp2_;
	AddPersonaTests* _tmp3_;
	GTestSuite* _tmp4_ = NULL;
	g_test_init (&args_length1, &args, NULL);
	_tmp0_ = g_test_get_root ();
	root = _tmp0_;
	_tmp1_ = root;
	_tmp2_ = add_persona_tests_new ();
	_tmp3_ = _tmp2_;
	_tmp4_ = folks_test_case_get_suite ((FolksTestCase*) _tmp3_);
	g_test_suite_add_suite (_tmp1_, _tmp4_);
	_g_object_unref0 (_tmp3_);
	g_test_run ();
	result = 0;
	return result;
}


int main (int argc, char ** argv) {
	g_type_init ();
	return _vala_main (argv, argc);
}



