[folks] Add subclasses for each category of TestCase



commit 63cc94f013e4e4e6326d312465c11cf2a9bb456f
Author: Simon McVittie <simon mcvittie collabora co uk>
Date:   Mon Mar 18 11:53:21 2013 +0000

    Add subclasses for each category of TestCase
    
    Move small amounts of initialization (just the low-hanging fruit)
    into each subclass. Folks.TestCase is now reserved for tests that
    don't need any backends or additional services at all.
    
    In the process, make TpTestsBackend.tear_down() idempotent, so it's OK
    if we call it repeatedly.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=695381
    Signed-off-by: Simon McVittie <simon mcvittie collabora co uk>
    Reviewed-by: Philip Withnall <philip tecnocode co uk>

 tests/eds/add-contacts-stress-test.vala            |   20 +---
 tests/eds/add-persona.vala                         |   20 +---
 tests/eds/anti-linking.vala                        |   35 +++---
 tests/eds/avatar-details.vala                      |   24 +----
 tests/eds/create-remove-stores.vala                |   16 +--
 tests/eds/email-details.vala                       |   28 +----
 tests/eds/enable-disable-stores.vala               |   20 +--
 tests/eds/im-details.vala                          |   24 +----
 tests/eds/individual-retrieval.vala                |   26 +----
 tests/eds/link-personas-diff-stores.vala           |   18 +---
 tests/eds/link-personas.vala                       |   25 +----
 tests/eds/linkable-properties.vala                 |   24 +---
 tests/eds/name-details.vala                        |   26 +----
 tests/eds/persona-store-tests.vala                 |   19 +--
 tests/eds/phone-details.vala                       |   26 +----
 tests/eds/postal-address-details.vala              |   22 +---
 tests/eds/remove-persona.vala                      |   20 +---
 tests/eds/removing-contacts.vala                   |   26 +----
 tests/eds/set-avatar.vala                          |   30 +----
 tests/eds/set-birthday.vala                        |   24 +----
 tests/eds/set-emails.vala                          |   24 +----
 tests/eds/set-gender.vala                          |   24 +----
 tests/eds/set-im-addresses.vala                    |   24 +----
 tests/eds/set-is-favourite.vala                    |   24 +----
 tests/eds/set-names.vala                           |   24 +----
 tests/eds/set-notes.vala                           |   24 +----
 tests/eds/set-phones.vala                          |   24 +----
 tests/eds/set-postal-addresses.vala                |   24 +----
 tests/eds/set-properties-race.vala                 |   24 +----
 tests/eds/set-roles.vala                           |   24 +----
 tests/eds/set-structured-name.vala                 |   24 +----
 tests/eds/set-urls.vala                            |   24 +----
 tests/eds/store-removed.vala                       |   27 +----
 tests/eds/updating-contacts.vala                   |   26 +----
 tests/folks/Makefile.am                            |    5 +
 tests/folks/abstract-field-details.vala            |    8 --
 tests/folks/aggregation.vala                       |   91 +++++++--------
 tests/folks/async-locking.vala                     |    5 +-
 tests/folks/avatar-cache.vala                      |    2 +
 tests/folks/backend-loading.vala                   |   13 +--
 tests/folks/init.vala                              |   41 +++----
 tests/folks/object-cache.vala                      |    2 +
 tests/folks/utils.vala                             |    8 --
 tests/key-file/individual-retrieval.vala           |   13 +--
 tests/lib/Makefile.am                              |    6 +-
 tests/lib/eds/Makefile.am                          |    6 +
 tests/lib/eds/test-case.vala                       |   66 +++++++++++
 tests/lib/folks-test.deps                          |    5 +
 tests/lib/key-file/Makefile.am                     |   15 +++-
 tests/lib/key-file/kf-test.deps                    |    5 +
 tests/lib/key-file/test-case.vala                  |   33 ++++++
 tests/lib/libsocialweb/Makefile.am                 |    7 +
 tests/lib/libsocialweb/test-case.vala              |   70 +++++++++++
 tests/lib/telepathy/Makefile.am                    |   65 +++++++++++
 tests/lib/telepathy/contactlist/backend.c          |    6 +
 tests/lib/telepathy/test-case.vala                 |  121 ++++++++++++++++++++
 tests/lib/telepathy/tpf-test.deps                  |    7 +
 tests/lib/test-case.vala                           |   18 +++
 tests/lib/tracker/Makefile.am                      |    6 +
 tests/lib/tracker/test-case.vala                   |   43 +++++++
 tests/libsocialweb/aggregation.vala                |   32 +----
 tests/libsocialweb/dummy-lsw.vala                  |   34 +-----
 tests/telepathy/Makefile.am                        |   10 ++
 tests/telepathy/individual-properties.vala         |   19 +---
 tests/telepathy/individual-retrieval.vala          |   19 +---
 tests/telepathy/init.vala                          |   21 +----
 tests/telepathy/persona-store-capabilities.vala    |   18 +---
 tests/tracker/add-contact.vala                     |   19 +---
 tests/tracker/add-persona.vala                     |   15 +---
 tests/tracker/additional-names-updates.vala        |   22 +---
 tests/tracker/avatar-details-interface.vala        |   18 +---
 tests/tracker/avatar-updates.vala                  |   26 +---
 tests/tracker/birthday-details-interface.vala      |   20 +---
 tests/tracker/birthday-updates.vala                |   24 +---
 tests/tracker/default-contact.vala                 |   19 +---
 tests/tracker/duplicated-emails.vala               |   14 +--
 tests/tracker/duplicated-phones.vala               |   14 +--
 tests/tracker/email-details-interface.vala         |   19 +---
 tests/tracker/emails-updates.vala                  |   31 ++----
 tests/tracker/family-name-updates.vala             |   22 +---
 tests/tracker/favourite-details-interface.vala     |   23 +---
 tests/tracker/favourite-updates.vala               |   26 +---
 tests/tracker/fullname-updates.vala                |   22 +---
 tests/tracker/gender-details-interface.vala        |   20 +---
 tests/tracker/given-name-updates.vala              |   22 +---
 tests/tracker/im-details-interface.vala            |   19 +---
 tests/tracker/imaddresses-updates.vala             |   30 ++----
 tests/tracker/individual-retrieval.vala            |   21 +---
 tests/tracker/link-personas-via-local-ids.vala     |   12 +-
 tests/tracker/link-personas.vala                   |   11 +-
 tests/tracker/match-all.vala                       |   14 +--
 tests/tracker/match-email-addresses.vala           |   14 +--
 tests/tracker/match-im-addresses.vala              |   14 +--
 tests/tracker/match-known-emails.vala              |   14 +--
 tests/tracker/match-name.vala                      |   14 +--
 tests/tracker/match-phone-number.vala              |   14 +--
 tests/tracker/name-details-interface.vala          |   21 +---
 tests/tracker/nickname-updates.vala                |   28 ++----
 tests/tracker/note-details-interface.vala          |   20 +---
 tests/tracker/phone-details-interface.vala         |   19 +---
 tests/tracker/phones-updates.vala                  |   30 ++----
 .../tracker/postal-address-details-interface.vala  |   19 +---
 tests/tracker/prefix-name-updates.vala             |   22 +---
 tests/tracker/remove-contact.vala                  |   21 +---
 tests/tracker/remove-persona.vala                  |   15 +---
 tests/tracker/role-details-interface.vala          |   20 +---
 tests/tracker/set-avatar.vala                      |   19 +---
 tests/tracker/set-birthday.vala                    |   19 +---
 tests/tracker/set-duplicate-email.vala             |   14 +--
 tests/tracker/set-emails.vala                      |   19 +---
 tests/tracker/set-favourite.vala                   |   21 +---
 tests/tracker/set-full-name.vala                   |   19 +---
 tests/tracker/set-gender.vala                      |   19 +---
 tests/tracker/set-im-addresses.vala                |   19 +---
 tests/tracker/set-nickname.vala                    |   19 +---
 tests/tracker/set-notes.vala                       |   19 +---
 tests/tracker/set-null-avatar.vala                 |   19 +---
 tests/tracker/set-phones.vala                      |   19 +---
 tests/tracker/set-postal-addresses.vala            |   19 +---
 tests/tracker/set-roles.vala                       |   19 +---
 tests/tracker/set-structured-name.vala             |   19 +---
 tests/tracker/set-urls.vala                        |   19 +---
 tests/tracker/suffix-name-updates.vala             |   22 +---
 tests/tracker/url-details-interface.vala           |   20 +---
 tests/tracker/website-updates.vala                 |   25 +---
 125 files changed, 961 insertions(+), 1809 deletions(-)
---
diff --git a/tests/eds/add-contacts-stress-test.vala b/tests/eds/add-contacts-stress-test.vala
index d354cf7..c750892 100644
--- a/tests/eds/add-contacts-stress-test.vala
+++ b/tests/eds/add-contacts-stress-test.vala
@@ -21,10 +21,9 @@
 using Folks;
 using Gee;
 
-public class AddContactsStressTestTests : Folks.TestCase
+public class AddContactsStressTestTests : EdsTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private Edsf.PersonaStore _pstore;
   private bool _added_contacts = false;
@@ -41,21 +40,6 @@ public class AddContactsStressTestTests : Folks.TestCase
       this.add_test (test_desc, this.test_add_contacts);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   public void test_add_contacts ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -105,7 +89,7 @@ public class AddContactsStressTestTests : Folks.TestCase
             {
               this._pstore =
                 (Edsf.PersonaStore) backend.persona_stores.get (
-                    this._eds_backend.address_book_uid);
+                    this.eds_backend.address_book_uid);
               if (this._pstore != null)
                 break;
             }
diff --git a/tests/eds/add-persona.vala b/tests/eds/add-persona.vala
index 0f3d723..961f2c4 100644
--- a/tests/eds/add-persona.vala
+++ b/tests/eds/add-persona.vala
@@ -21,10 +21,9 @@
 using Folks;
 using Gee;
 
-public class AddPersonaTests : Folks.TestCase
+public class AddPersonaTests : EdsTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private string _persona_nickname;
@@ -59,21 +58,6 @@ public class AddPersonaTests : Folks.TestCase
       this.add_test ("test adding a persona to e-d-s ", this.test_add_persona);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   public void test_add_persona ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -146,7 +130,7 @@ public class AddPersonaTests : Folks.TestCase
             {
               this._pstore =
                 (Edsf.PersonaStore) backend.persona_stores.get (
-                    this._eds_backend.address_book_uid);
+                    this.eds_backend.address_book_uid);
               if (this._pstore != null)
                 break;
             }
diff --git a/tests/eds/anti-linking.vala b/tests/eds/anti-linking.vala
index 9a68342..7d7baac 100644
--- a/tests/eds/anti-linking.vala
+++ b/tests/eds/anti-linking.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class AntiLinkingTests : Folks.TestCase
+public class AntiLinkingTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -47,31 +46,29 @@ public class AntiLinkingTests : Folks.TestCase
 
   public override void set_up ()
     {
+      base.set_up ();
+
       this._found_before_update = false;
       this._found_after_update = false;
       this._found_after_final_update = false;
-      this._eds_backend = new EdsTest.Backend ();
+    }
 
+  public override void create_backend ()
+    {
       /* Create a new backend (by name) each set up to guarantee we don't
        * inherit state from the last test.
        * FIXME: bgo#690830 */
       this._test_num++;
-      this._eds_backend.set_up (false, @"test$_test_num");
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
+      this.eds_backend = new EdsTest.Backend ();
+      this.eds_backend.set_up (false, @"test$_test_num");
     }
 
   public override void tear_down ()
     {
-      this._eds_backend.tear_down ();
-
-      Environment.unset_variable ("FOLKS_PRIMARY_STORE");
-
       /* necessary to clean out some stale state */
-      this._eds_backend = null;
       this._aggregator = null;
+
+      base.tear_down ();
     }
 
   /* Confirm that basic anti-linking works for two Personas who have a common
@@ -96,7 +93,7 @@ public class AntiLinkingTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string (_email_1);
       c.set ("email_1", (owned) v);
-      this._eds_backend.add_contact (c);
+      this.eds_backend.add_contact (c);
 
       c = new Gee.HashMap<string, Value?> ();
       v = Value (typeof (string));
@@ -106,7 +103,7 @@ public class AntiLinkingTests : Folks.TestCase
       /* Intentionally set the same email address so these will be linked */
       v.set_string (_email_1);
       c.set ("email_1", (owned) v);
-      this._eds_backend.add_contact (c);
+      this.eds_backend.add_contact (c);
 
       this._test_anti_linking_basic_async.begin ();
 
@@ -125,7 +122,7 @@ public class AntiLinkingTests : Folks.TestCase
 
   private async void _test_anti_linking_basic_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
@@ -223,7 +220,7 @@ public class AntiLinkingTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string (_email_1);
       c.set ("email_1", (owned) v);
-      this._eds_backend.add_contact (c);
+      this.eds_backend.add_contact (c);
 
       c = new Gee.HashMap<string, Value?> ();
       v = Value (typeof (string));
@@ -233,7 +230,7 @@ public class AntiLinkingTests : Folks.TestCase
       /* Intentionally set the same email address so these will be linked */
       v.set_string (_email_1);
       c.set ("email_1", (owned) v);
-      this._eds_backend.add_contact (c);
+      this.eds_backend.add_contact (c);
 
       this._test_anti_linking_removal_async.begin ();
 
@@ -253,7 +250,7 @@ public class AntiLinkingTests : Folks.TestCase
 
   private async void _test_anti_linking_removal_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/avatar-details.vala b/tests/eds/avatar-details.vala
index d37a203..d8339f6 100644
--- a/tests/eds/avatar-details.vala
+++ b/tests/eds/avatar-details.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class AvatarDetailsTests : Folks.TestCase
+public class AvatarDetailsTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
   private Gee.HashMap<string, Value?> _c1;
@@ -38,21 +37,6 @@ public class AvatarDetailsTests : Folks.TestCase
       this.add_test ("avatar details interface", this.test_avatar);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   public void test_avatar ()
     {
       this._c1 = new Gee.HashMap<string, Value?> ();
@@ -61,7 +45,7 @@ public class AvatarDetailsTests : Folks.TestCase
       this._avatars_are_equal = false;
       Value? v;
 
-      this._eds_backend.reset();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
@@ -69,7 +53,7 @@ public class AvatarDetailsTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string (this._avatar_path);
       this._c1.set ("avatar",(owned) v);
-      this._eds_backend.add_contact (this._c1);
+      this.eds_backend.add_contact (this._c1);
 
       this._test_avatar_async.begin ();
 
@@ -87,7 +71,7 @@ public class AvatarDetailsTests : Folks.TestCase
   private async void _test_avatar_async ()
     {
 
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/create-remove-stores.vala b/tests/eds/create-remove-stores.vala
index 92e97f5..5a1c4bb 100644
--- a/tests/eds/create-remove-stores.vala
+++ b/tests/eds/create-remove-stores.vala
@@ -21,10 +21,9 @@
 using Folks;
 using Gee;
 
-public class CreateRemoveStoresTests : Folks.TestCase
+public class CreateRemoveStoresTests : EdsTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private EdsTest.Backend? _eds_backend;
   private IndividualAggregator _aggregator;
   private HashMap<string, bool> _store_removed;
   private HashMap<string, bool> _store_added;
@@ -40,28 +39,21 @@ public class CreateRemoveStoresTests : Folks.TestCase
 
   public override void set_up ()
     {
-      this._eds_backend = new EdsTest.Backend ();
+      base.set_up ();
+
       this._store_removed = new HashMap<string, bool> ();
       this._store_added = new HashMap<string, bool> ();
       this._backend_store = BackendStore.dup();
 
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
       Environment.set_variable ("FOLKS_BACKEND_EDS_USE_ADDRESS_BOOKS",
                                 "test:other:test1:test2", true);
     }
 
   public override void tear_down ()
     {
-      this._eds_backend.tear_down ();
-
-      Environment.unset_variable ("FOLKS_PRIMARY_STORE");
       Environment.unset_variable ("FOLKS_BACKEND_EDS_USE_ADDRESS_BOOKS");
 
-      this._eds_backend = null;
+      base.tear_down ();
     }
 
   public void test_creating_removing_stores ()
diff --git a/tests/eds/email-details.vala b/tests/eds/email-details.vala
index da5d57a..8316077 100644
--- a/tests/eds/email-details.vala
+++ b/tests/eds/email-details.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class EmailDetailsTests : Folks.TestCase
+public class EmailDetailsTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
   private int _email_count;
@@ -40,21 +39,6 @@ public class EmailDetailsTests : Folks.TestCase
       this.add_test ("email details interface", this.test_email_details);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   public void test_email_details ()
     {
       this._email_count = 0;
@@ -65,7 +49,7 @@ public class EmailDetailsTests : Folks.TestCase
       this._main_loop = new GLib.MainLoop (null, false);
       Value? v;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
@@ -76,7 +60,7 @@ public class EmailDetailsTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("bernie innocenti example org");
       this._c1.set (Edsf.Persona.email_fields[1], (owned) v);
-      this._eds_backend.add_contact (this._c1);
+      this.eds_backend.add_contact (this._c1);
 
       v = Value (typeof (string));
       v.set_string ("richard m. stallman");
@@ -87,7 +71,7 @@ public class EmailDetailsTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("rms 1 example org");
       this._c2.set (Edsf.Persona.email_fields[1], (owned) v);
-      this._eds_backend.add_contact (this._c2);
+      this.eds_backend.add_contact (this._c2);
 
       v = Value (typeof (string));
       v.set_string ("foo bar");
@@ -98,7 +82,7 @@ public class EmailDetailsTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("foo bar example org");
       this._c3.set (Edsf.Persona.email_fields[1], (owned) v);
-      this._eds_backend.add_contact (this._c3);
+      this.eds_backend.add_contact (this._c3);
 
       this._test_email_details_async.begin ();
 
@@ -125,7 +109,7 @@ public class EmailDetailsTests : Folks.TestCase
   private async void _test_email_details_async ()
     {
 
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/enable-disable-stores.vala b/tests/eds/enable-disable-stores.vala
index ffb9af2..0c8cf24 100644
--- a/tests/eds/enable-disable-stores.vala
+++ b/tests/eds/enable-disable-stores.vala
@@ -21,10 +21,9 @@
 using Folks;
 using Gee;
 
-public class EnableDisableStoresTests : Folks.TestCase
+public class EnableDisableStoresTests : EdsTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private EdsTest.Backend? _eds_backend;
   private EdsTest.Backend? _eds_backend_other;
   private IndividualAggregator _aggregator;
   private HashMap<PersonaStore, bool> _store_removed;
@@ -41,31 +40,26 @@ public class EnableDisableStoresTests : Folks.TestCase
 
   public override void set_up ()
     {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend_other = new EdsTest.Backend ();
+      base.set_up ();
+
       this._store_removed = new HashMap<PersonaStore, bool> ();
       this._store_added = new HashMap<PersonaStore, bool> ();
       this._backend_store = BackendStore.dup();
 
-      this._eds_backend.set_up ();
+      this._eds_backend_other = new EdsTest.Backend ();
       this._eds_backend_other.set_up (false, "other");
 
       /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
       Environment.set_variable ("FOLKS_BACKEND_EDS_USE_ADDRESS_BOOKS",
                                 "test:other", true);
     }
 
   public override void tear_down ()
     {
-      this._eds_backend.tear_down ();
       this._eds_backend_other.tear_down ();
-
-      Environment.unset_variable ("FOLKS_PRIMARY_STORE");
-
-      this._eds_backend = null;
       this._eds_backend_other = null;
+
+      base.tear_down ();
     }
 
   public void test_disabling_stores ()
@@ -110,7 +104,7 @@ public class EnableDisableStoresTests : Folks.TestCase
           backend.persona_store_added.connect (this._store_added_cb);
           
           var pstore = this._get_store (this._backend_store,
-              this._eds_backend.address_book_uid);
+              this.eds_backend.address_book_uid);
           assert (pstore != null);
           this._store_removed[pstore] = false;
           this._store_added[pstore] = false;
diff --git a/tests/eds/im-details.vala b/tests/eds/im-details.vala
index abdd73e..a95874d 100644
--- a/tests/eds/im-details.vala
+++ b/tests/eds/im-details.vala
@@ -21,9 +21,8 @@
 using Folks;
 using Gee;
 
-public class ImDetailsTests : Folks.TestCase
+public class ImDetailsTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
   private int _num_addrs;
@@ -40,21 +39,6 @@ public class ImDetailsTests : Folks.TestCase
           this.test_im_details_interface);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   public void test_im_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -64,7 +48,7 @@ public class ImDetailsTests : Folks.TestCase
       this._im_addrs += ",im_yahoo_home_1#test2 example org";
       Value? v;
 
-      this._eds_backend.reset();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string (this._fullname);
@@ -73,7 +57,7 @@ public class ImDetailsTests : Folks.TestCase
       v.set_string (this._im_addrs);
       c1.set ("im_addresses", (owned) v);
 
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._num_addrs = 0;
       this._found_addr_1 = false;
@@ -97,7 +81,7 @@ public class ImDetailsTests : Folks.TestCase
   private async void _test_im_details_interface_async ()
     {
 
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/individual-retrieval.vala b/tests/eds/individual-retrieval.vala
index c233715..ae6d129 100644
--- a/tests/eds/individual-retrieval.vala
+++ b/tests/eds/individual-retrieval.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class IndividualRetrievalTests : Folks.TestCase
+public class IndividualRetrievalTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
   private HashSet<string> _found_individuals;
@@ -36,21 +35,6 @@ public class IndividualRetrievalTests : Folks.TestCase
       this.add_test ("singleton individuals", this.test_singleton_individuals);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   public void test_singleton_individuals ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -59,7 +43,7 @@ public class IndividualRetrievalTests : Folks.TestCase
       this._main_loop = new GLib.MainLoop (null, false);
       Value? v;
 
-      this._eds_backend.reset();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
@@ -67,7 +51,7 @@ public class IndividualRetrievalTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("bernie example org");
       c1.set(Edsf.Persona.email_fields[0], (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       v = Value (typeof (string));
       v.set_string ("richard m. stallman");
@@ -75,7 +59,7 @@ public class IndividualRetrievalTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("rms example org");
       c2.set(Edsf.Persona.email_fields[0], (owned) v);
-      this._eds_backend.add_contact (c2);
+      this.eds_backend.add_contact (c2);
 
       this._test_singleton_individuals_async.begin ();
 
@@ -93,7 +77,7 @@ public class IndividualRetrievalTests : Folks.TestCase
   private async void _test_singleton_individuals_async ()
     {
 
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/link-personas-diff-stores.vala b/tests/eds/link-personas-diff-stores.vala
index 01cdf6b..ba272cd 100644
--- a/tests/eds/link-personas-diff-stores.vala
+++ b/tests/eds/link-personas-diff-stores.vala
@@ -21,10 +21,9 @@
 using Folks;
 using Gee;
 
-public class LinkPersonasDiffStoresTests : Folks.TestCase
+public class LinkPersonasDiffStoresTests : EdsTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private EdsTest.Backend? _eds_backend;
   private EdsTest.Backend? _eds_backend_other;
   private IndividualAggregator _aggregator;
   private string _persona_fullname_1;
@@ -45,28 +44,19 @@ public class LinkPersonasDiffStoresTests : Folks.TestCase
 
   public override void set_up ()
     {
-      this._eds_backend = new EdsTest.Backend ();
+      base.set_up ();
       this._eds_backend_other = new EdsTest.Backend ();
-
-      this._eds_backend.set_up ();
       this._eds_backend_other.set_up (false, "other");
 
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
       Environment.set_variable ("FOLKS_BACKEND_EDS_USE_ADDRESS_BOOKS",
                                 "test:other", true);
     }
 
   public override void tear_down ()
     {
-      this._eds_backend.tear_down ();
       this._eds_backend_other.tear_down ();
-
-      Environment.unset_variable ("FOLKS_PRIMARY_STORE");
-
-      this._eds_backend = null;
       this._eds_backend_other = null;
+      base.tear_down ();
     }
 
   public void test_linking_via_local_ids_diff_stores ()
@@ -114,7 +104,7 @@ public class LinkPersonasDiffStoresTests : Folks.TestCase
           this._aggregator.notify["is-quiescent"].connect ((obj, pspec) =>
             {
               var pstore = this._get_store (store,
-                  this._eds_backend.address_book_uid);
+                  this.eds_backend.address_book_uid);
               assert (pstore != null);
               assert (pstore.is_prepared == true);
 
diff --git a/tests/eds/link-personas.vala b/tests/eds/link-personas.vala
index 6b4443a..be9bd60 100644
--- a/tests/eds/link-personas.vala
+++ b/tests/eds/link-personas.vala
@@ -30,10 +30,9 @@ enum LinkingMethod
 }
 
 
-public class LinkPersonasTests : Folks.TestCase
+public class LinkPersonasTests : EdsTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private EdsTest.Backend? _eds_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname_1;
   private string _persona_fullname_2;
@@ -64,28 +63,14 @@ public class LinkPersonasTests : Folks.TestCase
           this.test_linking_via_email_as_im_address);
     }
 
-  public override void set_up ()
+  public override void create_backend ()
     {
-      this._eds_backend = new EdsTest.Backend ();
-
       /* Create a new backend (by name) each set up to guarantee we don't
        * inherit state from the last test.
        * FIXME: bgo#690830 */
       this._test_num++;
-      this._eds_backend.set_up (false, @"test$_test_num");
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-
-      Environment.unset_variable ("FOLKS_PRIMARY_STORE");
-
-      this._eds_backend = null;
+      this.eds_backend = new EdsTest.Backend ();
+      this.eds_backend.set_up (false, @"test$_test_num");
     }
 
   public void test_linking_personas_via_im_addresses ()
@@ -169,7 +154,7 @@ public class LinkPersonasTests : Folks.TestCase
           yield this._aggregator.prepare ();
 
           var pstore = this._get_store (store,
-              this._eds_backend.address_book_uid);
+              this.eds_backend.address_book_uid);
           assert (pstore != null);
 
           pstore.notify["is-prepared"].connect (this._notify_pstore_cb);
diff --git a/tests/eds/linkable-properties.vala b/tests/eds/linkable-properties.vala
index 817716c..26fc273 100644
--- a/tests/eds/linkable-properties.vala
+++ b/tests/eds/linkable-properties.vala
@@ -23,9 +23,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class LinkablePropertiesTests : Folks.TestCase
+public class LinkablePropertiesTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -54,19 +53,10 @@ public class LinkablePropertiesTests : Folks.TestCase
 
   public override void set_up ()
     {
+      base.set_up ();
+
       this._found_before_update = false;
       this._found_after_update = false;
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
     }
 
   /* Check that two unaggregated Personas get aggregated after one changes its
@@ -84,7 +74,7 @@ public class LinkablePropertiesTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       c = new Gee.HashMap<string, Value?> ();
       v = Value (typeof (string));
@@ -96,7 +86,7 @@ public class LinkablePropertiesTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string (_phone_1);
       c.set ("home_phone", (owned) v);
-      this._eds_backend.add_contact (c);
+      this.eds_backend.add_contact (c);
 
       c = new Gee.HashMap<string, Value?> ();
       v = Value (typeof (string));
@@ -108,7 +98,7 @@ public class LinkablePropertiesTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string (_phone_2);
       c.set ("mobile_phone", (owned) v);
-      this._eds_backend.add_contact (c);
+      this.eds_backend.add_contact (c);
 
       this._test_linkable_properties_aggregate_after_change_async.begin ();
 
@@ -128,7 +118,7 @@ public class LinkablePropertiesTests : Folks.TestCase
 
   private async void _test_linkable_properties_aggregate_after_change_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/name-details.vala b/tests/eds/name-details.vala
index 047e8d1..11844f6 100644
--- a/tests/eds/name-details.vala
+++ b/tests/eds/name-details.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class NameDetailsTests : Folks.TestCase
+public class NameDetailsTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
   private int _names_count;
@@ -38,21 +37,6 @@ public class NameDetailsTests : Folks.TestCase
       this.add_test ("name details interface", this.test_names);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   public void test_names ()
     {
       this._c1 = new Gee.HashMap<string, Value?> ();
@@ -61,7 +45,7 @@ public class NameDetailsTests : Folks.TestCase
       this._main_loop = new GLib.MainLoop (null, false);
       Value? v;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       /* FIXME: passing the EContactName would be better */
       v = Value (typeof (string));
@@ -85,7 +69,7 @@ public class NameDetailsTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("(sysadmin FSF)");
       this._c1.set ("contact_name_suffixes", (owned) v);
-      this._eds_backend.add_contact (this._c1);
+      this.eds_backend.add_contact (this._c1);
 
       v = Value (typeof (string));
       v.set_string ("richard m. stallman");
@@ -96,7 +80,7 @@ public class NameDetailsTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("Richard M.");
       this._c2.set ("contact_name_given", (owned) v);
-      this._eds_backend.add_contact (this._c2);
+      this.eds_backend.add_contact (this._c2);
 
       this._test_names_async.begin ();
 
@@ -116,7 +100,7 @@ public class NameDetailsTests : Folks.TestCase
   private async void _test_names_async ()
     {
 
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/persona-store-tests.vala b/tests/eds/persona-store-tests.vala
index 517198c..b6a7a12 100644
--- a/tests/eds/persona-store-tests.vala
+++ b/tests/eds/persona-store-tests.vala
@@ -22,27 +22,20 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class PersonaStoreTests : Folks.TestCase
+public class PersonaStoreTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private HashSet<string> _capabilities_received;
 
   public PersonaStoreTests ()
     {
       base ("PersonaStoreTests");
-      this._eds_backend = new EdsTest.Backend ();
       this.add_test ("persona store tests", this.test_persona_store);
     }
 
   public override void set_up ()
     {
+      base.set_up ();
       this._capabilities_received = new HashSet<string> ();
-
-      this._eds_backend.set_up ();
-    }
-
-  public override void tear_down ()
-    {
     }
 
   public void test_persona_store ()
@@ -52,7 +45,7 @@ public class PersonaStoreTests : Folks.TestCase
       var main_loop = new GLib.MainLoop (null, false);
       Value? v;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
@@ -60,7 +53,7 @@ public class PersonaStoreTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("bernie example org");
       c1.set (Edsf.Persona.email_fields[0], (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       v = Value (typeof (string));
       v.set_string ("richard m. stallman");
@@ -68,7 +61,7 @@ public class PersonaStoreTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("rms example org");
       c2.set (Edsf.Persona.email_fields[0], (owned) v);
-      this._eds_backend.add_contact (c2);
+      this.eds_backend.add_contact (c2);
 
       var backend_store = BackendStore.dup ();
       backend_store.prepare.begin ((o, r) =>
@@ -107,7 +100,7 @@ public class PersonaStoreTests : Folks.TestCase
       assert (!this._capabilities_received.contains ("can-alias-personas"));
       assert (this._capabilities_received.contains ("can-group-personas"));
 
-      this._eds_backend.tear_down ();
+      this.eds_backend.tear_down ();
     }
 
   private void _set_up_persona_store (Folks.PersonaStore store)
diff --git a/tests/eds/phone-details.vala b/tests/eds/phone-details.vala
index 2d1c850..82d90e2 100644
--- a/tests/eds/phone-details.vala
+++ b/tests/eds/phone-details.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class PhoneDetailsTests : Folks.TestCase
+public class PhoneDetailsTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
   private int _phones_count;
@@ -39,21 +38,6 @@ public class PhoneDetailsTests : Folks.TestCase
       this.add_test ("phone details interface", this.test_phone_numbers);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   public void test_phone_numbers ()
     {
       this._phones_count = 0;
@@ -63,7 +47,7 @@ public class PhoneDetailsTests : Folks.TestCase
       this._main_loop = new GLib.MainLoop (null, false);
       Value? v;
 
-      this._eds_backend.reset();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
@@ -77,7 +61,7 @@ public class PhoneDetailsTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("12345");
       this._c1.set ("home_phone", (owned) v);
-      this._eds_backend.add_contact (this._c1);
+      this.eds_backend.add_contact (this._c1);
 
       v = Value (typeof (string));
       v.set_string ("richard m. stallman");
@@ -91,7 +75,7 @@ public class PhoneDetailsTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("321");
       this._c2.set ("home_phone", (owned) v);
-      this._eds_backend.add_contact (this._c2);
+      this.eds_backend.add_contact (this._c2);
 
       this._test_phone_numbers_async.begin ();
 
@@ -117,7 +101,7 @@ public class PhoneDetailsTests : Folks.TestCase
   private async void _test_phone_numbers_async ()
     {
 
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/postal-address-details.vala b/tests/eds/postal-address-details.vala
index 7921387..69b4781 100644
--- a/tests/eds/postal-address-details.vala
+++ b/tests/eds/postal-address-details.vala
@@ -21,11 +21,10 @@
 using Folks;
 using Gee;
 
-public class PostalAddressDetailsTests : Folks.TestCase
+public class PostalAddressDetailsTests : EdsTest.TestCase
 {
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
-  private EdsTest.Backend _eds_backend;
   private string _pobox = "12345";
   private string _locality = "example locality";
   private string _postalcode = "example postalcode";
@@ -45,21 +44,6 @@ public class PostalAddressDetailsTests : Folks.TestCase
           this.test_postal_address_details_interface);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   public void test_postal_address_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -100,7 +84,7 @@ public class PostalAddressDetailsTests : Folks.TestCase
       /* corresponds to address of type "home" */
       c1.set (Edsf.Persona.address_fields[0], (owned) v);
 
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._found_postal_address = false;
 
@@ -120,7 +104,7 @@ public class PostalAddressDetailsTests : Folks.TestCase
   private async void _test_postal_address_details_interface_async ()
     {
 
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/remove-persona.vala b/tests/eds/remove-persona.vala
index b674b82..e545a39 100644
--- a/tests/eds/remove-persona.vala
+++ b/tests/eds/remove-persona.vala
@@ -21,10 +21,9 @@
 using Folks;
 using Gee;
 
-public class RemovePersonaTests : Folks.TestCase
+public class RemovePersonaTests : EdsTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private bool _persona_removed;
@@ -43,21 +42,6 @@ public class RemovePersonaTests : Folks.TestCase
           this.test_remove_persona);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   public void test_remove_persona ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -96,7 +80,7 @@ public class RemovePersonaTests : Folks.TestCase
             {
               this._pstore =
                 (Edsf.PersonaStore) backend.persona_stores.get (
-                    this._eds_backend.address_book_uid);
+                    this.eds_backend.address_book_uid);
               if (this._pstore != null)
                 break;
             }
diff --git a/tests/eds/removing-contacts.vala b/tests/eds/removing-contacts.vala
index 6113a14..58b0443 100644
--- a/tests/eds/removing-contacts.vala
+++ b/tests/eds/removing-contacts.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class RemovingContactsTests : Folks.TestCase
+public class RemovingContactsTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _removed;
@@ -37,21 +36,6 @@ public class RemovingContactsTests : Folks.TestCase
       this.add_test ("removing contact", this.test_removal);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-   }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_removal ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -61,12 +45,12 @@ public class RemovingContactsTests : Folks.TestCase
       this._added = false;
       this._removed = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_removal_async.begin ();
 
@@ -83,7 +67,7 @@ public class RemovingContactsTests : Folks.TestCase
 
   private async void _test_removal_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
@@ -116,7 +100,7 @@ public class RemovingContactsTests : Folks.TestCase
           var name = (Folks.NameDetails) i;
           this._added = true;
           assert (name.full_name == "bernie h. innocenti");
-          this._eds_backend.remove_contact.begin (0);
+          this.eds_backend.remove_contact.begin (0);
         }
 
       foreach (Individual i in removed)
diff --git a/tests/eds/set-avatar.vala b/tests/eds/set-avatar.vala
index 0f1a4ef..a9a06e8 100644
--- a/tests/eds/set-avatar.vala
+++ b/tests/eds/set-avatar.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetAvatarTests : Folks.TestCase
+public class SetAvatarTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -40,21 +39,6 @@ public class SetAvatarTests : Folks.TestCase
           this.test_set_individual_avatar);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_avatar ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -66,12 +50,12 @@ public class SetAvatarTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_avatar_async.begin ();
 
@@ -92,7 +76,7 @@ public class SetAvatarTests : Folks.TestCase
 
   private async void _test_set_avatar_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
@@ -175,12 +159,12 @@ public class SetAvatarTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("John McClane");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_individual_avatar_async.begin ();
 
@@ -202,7 +186,7 @@ public class SetAvatarTests : Folks.TestCase
 
   private async void _test_set_individual_avatar_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-birthday.vala b/tests/eds/set-birthday.vala
index 2b4f535..10a1c47 100644
--- a/tests/eds/set-birthday.vala
+++ b/tests/eds/set-birthday.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetBirthdayTests : Folks.TestCase
+public class SetBirthdayTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -38,21 +37,6 @@ public class SetBirthdayTests : Folks.TestCase
           this.test_set_birthday);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_birthday ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -62,12 +46,12 @@ public class SetBirthdayTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("John McClane");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_birthday_async.begin ();
 
@@ -84,7 +68,7 @@ public class SetBirthdayTests : Folks.TestCase
 
   private async void _test_set_birthday_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-emails.vala b/tests/eds/set-emails.vala
index c36bf41..69f7bf1 100644
--- a/tests/eds/set-emails.vala
+++ b/tests/eds/set-emails.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetEmailsTests : Folks.TestCase
+public class SetEmailsTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -37,21 +36,6 @@ public class SetEmailsTests : Folks.TestCase
       this.add_test ("setting emails on e-d-s persona", this.test_set_emails);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_emails ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -61,12 +45,12 @@ public class SetEmailsTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_emails_async.begin ();
 
@@ -83,7 +67,7 @@ public class SetEmailsTests : Folks.TestCase
 
   private async void _test_set_emails_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-gender.vala b/tests/eds/set-gender.vala
index f296174..6ea474a 100644
--- a/tests/eds/set-gender.vala
+++ b/tests/eds/set-gender.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetGenderTests : Folks.TestCase
+public class SetGenderTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _gender_before_update;
@@ -38,21 +37,6 @@ public class SetGenderTests : Folks.TestCase
           this.test_set_gender);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_gender ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -62,12 +46,12 @@ public class SetGenderTests : Folks.TestCase
       this._gender_before_update = false;
       this._gender_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("jimmy neutron");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_gender_async.begin ();
 
@@ -85,7 +69,7 @@ public class SetGenderTests : Folks.TestCase
 
   private async void _test_set_gender_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-im-addresses.vala b/tests/eds/set-im-addresses.vala
index 3808e17..5cd74d7 100644
--- a/tests/eds/set-im-addresses.vala
+++ b/tests/eds/set-im-addresses.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetIMAddressesTests : Folks.TestCase
+public class SetIMAddressesTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -38,21 +37,6 @@ public class SetIMAddressesTests : Folks.TestCase
           this.test_set_im_addresses);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_im_addresses ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -62,12 +46,12 @@ public class SetIMAddressesTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_im_addresses_async.begin ();
 
@@ -84,7 +68,7 @@ public class SetIMAddressesTests : Folks.TestCase
 
   private async void _test_set_im_addresses_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-is-favourite.vala b/tests/eds/set-is-favourite.vala
index 48c686d..1305601 100644
--- a/tests/eds/set-is-favourite.vala
+++ b/tests/eds/set-is-favourite.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetIsFavouriteTests : Folks.TestCase
+public class SetIsFavouriteTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _is_favourite_before_update;
@@ -38,21 +37,6 @@ public class SetIsFavouriteTests : Folks.TestCase
           this.test_set_favourite);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_favourite ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -62,12 +46,12 @@ public class SetIsFavouriteTests : Folks.TestCase
       this._is_favourite_before_update = true;
       this._is_favourite_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("juanito from mallorca");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_is_favourite_async.begin ();
 
@@ -85,7 +69,7 @@ public class SetIsFavouriteTests : Folks.TestCase
 
   private async void _test_set_is_favourite_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-names.vala b/tests/eds/set-names.vala
index c974612..3950e4b 100644
--- a/tests/eds/set-names.vala
+++ b/tests/eds/set-names.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetNamesTests : Folks.TestCase
+public class SetNamesTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _full_name_found_before_update;
@@ -40,21 +39,6 @@ public class SetNamesTests : Folks.TestCase
           this.test_set_names);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_names ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -66,7 +50,7 @@ public class SetNamesTests : Folks.TestCase
       this._nickname_found_before_update = false;
       this._nickname_found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
@@ -74,7 +58,7 @@ public class SetNamesTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("foo bar");
       c1.set ("nickname", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_names_async.begin ();
 
@@ -93,7 +77,7 @@ public class SetNamesTests : Folks.TestCase
 
   private async void _test_set_names_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-notes.vala b/tests/eds/set-notes.vala
index 0ab0689..693dc00 100644
--- a/tests/eds/set-notes.vala
+++ b/tests/eds/set-notes.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetNotesTests : Folks.TestCase
+public class SetNotesTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -39,21 +38,6 @@ public class SetNotesTests : Folks.TestCase
           this.test_set_notes);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_notes ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -63,12 +47,12 @@ public class SetNotesTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_full_name_async.begin ();
 
@@ -85,7 +69,7 @@ public class SetNotesTests : Folks.TestCase
 
   private async void _test_set_full_name_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-phones.vala b/tests/eds/set-phones.vala
index 03701b9..c7be0e4 100644
--- a/tests/eds/set-phones.vala
+++ b/tests/eds/set-phones.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetPhonesTests : Folks.TestCase
+public class SetPhonesTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -37,21 +36,6 @@ public class SetPhonesTests : Folks.TestCase
       this.add_test ("setting phones on e-d-s persona", this.test_set_phones);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_phones ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -61,12 +45,12 @@ public class SetPhonesTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_phones_async.begin ();
 
@@ -83,7 +67,7 @@ public class SetPhonesTests : Folks.TestCase
 
   private async void _test_set_phones_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-postal-addresses.vala b/tests/eds/set-postal-addresses.vala
index dffb6ff..f7207fc 100644
--- a/tests/eds/set-postal-addresses.vala
+++ b/tests/eds/set-postal-addresses.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetPostalAddressesTests : Folks.TestCase
+public class SetPostalAddressesTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -39,21 +38,6 @@ public class SetPostalAddressesTests : Folks.TestCase
           this.test_set_postal_addresses);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_postal_addresses ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -69,12 +53,12 @@ public class SetPostalAddressesTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_postal_addresses_async.begin ();
 
@@ -91,7 +75,7 @@ public class SetPostalAddressesTests : Folks.TestCase
 
   private async void _test_set_postal_addresses_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-properties-race.vala b/tests/eds/set-properties-race.vala
index c92db91..8c447e9 100644
--- a/tests/eds/set-properties-race.vala
+++ b/tests/eds/set-properties-race.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetPropertiesRaceTests : Folks.TestCase
+public class SetPropertiesRaceTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -39,21 +38,6 @@ public class SetPropertiesRaceTests : Folks.TestCase
           this.test_set_postal_addresses);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_postal_addresses ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -69,12 +53,12 @@ public class SetPropertiesRaceTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_postal_addresses_async.begin ();
 
@@ -91,7 +75,7 @@ public class SetPropertiesRaceTests : Folks.TestCase
 
   private async void _test_set_postal_addresses_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-roles.vala b/tests/eds/set-roles.vala
index 89e38ee..37ba751 100644
--- a/tests/eds/set-roles.vala
+++ b/tests/eds/set-roles.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetRolesTests : Folks.TestCase
+public class SetRolesTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -39,21 +38,6 @@ public class SetRolesTests : Folks.TestCase
           this.test_set_roles);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_roles ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -63,12 +47,12 @@ public class SetRolesTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("The Guard");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_roles_async.begin ();
 
@@ -85,7 +69,7 @@ public class SetRolesTests : Folks.TestCase
 
   private async void _test_set_roles_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-structured-name.vala b/tests/eds/set-structured-name.vala
index 754e799..3e4540b 100644
--- a/tests/eds/set-structured-name.vala
+++ b/tests/eds/set-structured-name.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetStructuredNameTests : Folks.TestCase
+public class SetStructuredNameTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -39,21 +38,6 @@ public class SetStructuredNameTests : Folks.TestCase
           this.test_set_structured_name);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_structured_name ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -64,12 +48,12 @@ public class SetStructuredNameTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_structured_name_async.begin ();
 
@@ -86,7 +70,7 @@ public class SetStructuredNameTests : Folks.TestCase
 
   private async void _test_set_structured_name_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/set-urls.vala b/tests/eds/set-urls.vala
index 6b19d54..a18833f 100644
--- a/tests/eds/set-urls.vala
+++ b/tests/eds/set-urls.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class SetUrlsTests : Folks.TestCase
+public class SetUrlsTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -46,21 +45,6 @@ public class SetUrlsTests : Folks.TestCase
           this.test_set_urls);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_set_urls ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -73,12 +57,12 @@ public class SetUrlsTests : Folks.TestCase
       this._found_url_home = false;
       this._found_url_blog = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("Albus Percival Wulfric Brian Dumbledore");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_set_urls_async.begin ();
 
@@ -98,7 +82,7 @@ public class SetUrlsTests : Folks.TestCase
 
   private async void _test_set_urls_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
diff --git a/tests/eds/store-removed.vala b/tests/eds/store-removed.vala
index b8c99a5..9073765 100644
--- a/tests/eds/store-removed.vala
+++ b/tests/eds/store-removed.vala
@@ -23,9 +23,8 @@ using E;
 using Folks;
 using Gee;
 
-public class StoreRemovedTests : Folks.TestCase
+public class StoreRemovedTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
 
@@ -36,26 +35,11 @@ public class StoreRemovedTests : Folks.TestCase
       this.add_test ("single store", this.test_single_store);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   public void test_single_store ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       /* Create a contact in the address book. */
       var c1 = new Gee.HashMap<string, Value?> ();
@@ -68,7 +52,7 @@ public class StoreRemovedTests : Folks.TestCase
       v.set_string ("brian example com");
       c1.set (Edsf.Persona.email_fields[0], (owned) v);
 
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       /* Schedule the test to start with the main loop. */
       this._test_single_store_part1_async.begin ();
@@ -105,7 +89,7 @@ public class StoreRemovedTests : Folks.TestCase
 
   private async void _test_single_store_part1_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
@@ -182,7 +166,8 @@ public class StoreRemovedTests : Folks.TestCase
 
       /* Tear down the backend. This should remove all individuals. We check
        * for this above. */
-      this._eds_backend.tear_down ();
+      this.eds_backend.tear_down ();
+      this.eds_backend = null;
     }
 }
 
diff --git a/tests/eds/updating-contacts.vala b/tests/eds/updating-contacts.vala
index 2937e6e..4fad912 100644
--- a/tests/eds/updating-contacts.vala
+++ b/tests/eds/updating-contacts.vala
@@ -22,9 +22,8 @@ using EdsTest;
 using Folks;
 using Gee;
 
-public class UpdatingContactsTests : Folks.TestCase
+public class UpdatingContactsTests : EdsTest.TestCase
 {
-  private EdsTest.Backend _eds_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _found_before_update;
@@ -37,21 +36,6 @@ public class UpdatingContactsTests : Folks.TestCase
       this.add_test ("updating contact", this.test_updates);
     }
 
-  public override void set_up ()
-    {
-      this._eds_backend = new EdsTest.Backend ();
-      this._eds_backend.set_up ();
-
-      /* We configure eds as the primary store */
-      var config_val = "eds:%s".printf (this._eds_backend.address_book_uid);
-      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
-    }
-
-  public override void tear_down ()
-    {
-      this._eds_backend.tear_down ();
-    }
-
   void test_updates ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
@@ -61,12 +45,12 @@ public class UpdatingContactsTests : Folks.TestCase
       this._found_before_update = false;
       this._found_after_update = false;
 
-      this._eds_backend.reset ();
+      this.eds_backend.reset ();
 
       v = Value (typeof (string));
       v.set_string ("bernie h. innocenti");
       c1.set ("full_name", (owned) v);
-      this._eds_backend.add_contact (c1);
+      this.eds_backend.add_contact (c1);
 
       this._test_updates_async.begin ();
 
@@ -83,7 +67,7 @@ public class UpdatingContactsTests : Folks.TestCase
 
   private async void _test_updates_async ()
     {
-      yield this._eds_backend.commit_contacts_to_addressbook ();
+      yield this.eds_backend.commit_contacts_to_addressbook ();
 
       var store = BackendStore.dup ();
       yield store.prepare ();
@@ -137,7 +121,7 @@ public class UpdatingContactsTests : Folks.TestCase
       v = Value (typeof (string));
       v.set_string ("bernie innocenti");
       updated_data.set("full_name", (owned) v);
-      yield this._eds_backend.update_contact (0, updated_data);
+      yield this.eds_backend.update_contact (0, updated_data);
     }
 
   private void _notify_full_name_cb (Object individual_obj, ParamSpec ps)
diff --git a/tests/folks/Makefile.am b/tests/folks/Makefile.am
index 6a74ba6..b51f242 100644
--- a/tests/folks/Makefile.am
+++ b/tests/folks/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/folks \
        -I$(top_srcdir)/tests/lib \
        -I$(top_srcdir)/tests/lib/key-file \
+       -I$(top_srcdir)/tests/lib/telepathy \
        -I$(top_srcdir)/tests/lib/telepathy/contactlist \
        -include $(CONFIG_HEADER) \
        $(NULL)
@@ -13,6 +14,7 @@ AM_CPPFLAGS = \
 LDADD = \
        $(top_builddir)/tests/lib/libfolks-test.la \
        $(top_builddir)/tests/lib/key-file/libkf-test.la \
+       $(top_builddir)/tests/lib/telepathy/libtpf-test.la \
        $(top_builddir)/tests/lib/telepathy/contactlist/libtp-test-contactlist.la \
        $(top_builddir)/folks/libfolks.la \
        $(GLIB_LIBS) \
@@ -36,6 +38,8 @@ AM_VALAFLAGS += \
        --vapidir=$(abs_top_builddir)/tests/lib \
        --vapidir=$(abs_top_srcdir)/tests/lib/key-file \
        --vapidir=$(abs_top_builddir)/tests/lib/key-file \
+       --vapidir=$(abs_top_srcdir)/tests/lib/telepathy \
+       --vapidir=$(abs_top_builddir)/tests/lib/telepathy \
        --vapidir=$(abs_top_srcdir)/tests/lib/telepathy/contactlist/ \
        --vapidir=$(abs_top_builddir)/tests/lib/telepathy/contactlist/ \
        --pkg gobject-2.0 \
@@ -44,6 +48,7 @@ AM_VALAFLAGS += \
        --pkg folks \
        --pkg folks-test \
        --pkg kf-test \
+       --pkg tpf-test \
        --pkg tp-test-contactlist \
        -g \
        $(NULL)
diff --git a/tests/folks/abstract-field-details.vala b/tests/folks/abstract-field-details.vala
index 63e6a6a..762b492 100644
--- a/tests/folks/abstract-field-details.vala
+++ b/tests/folks/abstract-field-details.vala
@@ -36,14 +36,6 @@ public class EmailFieldDetailsTests : Folks.TestCase
           this.test_generic_afd_handling);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_param_replacement ()
     {
       string param_name = "metasyntactic-variables";
diff --git a/tests/folks/aggregation.vala b/tests/folks/aggregation.vala
index 39b7d2d..2919292 100644
--- a/tests/folks/aggregation.vala
+++ b/tests/folks/aggregation.vala
@@ -21,10 +21,8 @@ using Gee;
 using Folks;
 using TpTests;
 
-public class AggregationTests : Folks.TestCase
+public class AggregationTests : TpfTest.MixedTestCase
 {
-  private KfTest.Backend _kf_backend;
-  private TpTests.Backend _tp_backend;
   private HashSet<string> _default_personas;
   private int _test_timeout = 3;
 
@@ -32,9 +30,6 @@ public class AggregationTests : Folks.TestCase
     {
       base ("Aggregation");
 
-      this._kf_backend = new KfTest.Backend ();
-      this._tp_backend = new TpTests.Backend ();
-
       /* Create a set of the individuals we expect to see */
       this._default_personas = new HashSet<string> ();
 
@@ -67,14 +62,15 @@ public class AggregationTests : Folks.TestCase
           this._test_timeout = 10;
     }
 
-  public override void set_up ()
+  public override void set_up_tp ()
     {
-      this._tp_backend.set_up ();
+      /* don't create accounts - we do that per-test */
+      ((!) this.tp_backend).set_up ();
     }
 
-  public override void tear_down ()
+  public override void set_up_kf ()
     {
-      this._tp_backend.tear_down ();
+      /* don't set up - we do it per-test */
     }
 
   /* Test that personas are aggregated if their IIDs match (e.g. with the
@@ -88,11 +84,12 @@ public class AggregationTests : Folks.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._kf_backend.set_up ("");
+      var tp_backend = (!) this.tp_backend;
+      ((!) this.kf_backend).set_up ("");
 
-      void* account1_handle = this._tp_backend.add_account ("protocol",
+      void* account1_handle = tp_backend.add_account ("protocol",
           "me example com", "cm", "account");
-      void* account2_handle = this._tp_backend.add_account ("protocol",
+      void* account2_handle = tp_backend.add_account ("protocol",
           "me2 example com", "cm", "account2");
 
       /* IDs of the individuals we expect to see.
@@ -186,9 +183,8 @@ public class AggregationTests : Folks.TestCase
       assert (expected_individuals_detailed.size == 0);
 
       /* Clean up for the next test */
-      this._tp_backend.remove_account (account2_handle);
-      this._tp_backend.remove_account (account1_handle);
-      this._kf_backend.tear_down ();
+      tp_backend.remove_account (account2_handle);
+      tp_backend.remove_account (account1_handle);
       aggregator = null;
     }
 
@@ -257,14 +253,14 @@ public class AggregationTests : Folks.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._kf_backend.set_up ("[0]\n" +
+      ((!) this.kf_backend).set_up ("[0]\n" +
           "protocol=travis example com;olivier example com;" +
               "guillaume example com;sjoerd example com\n" +
           "[1]\n" +
           "protocol=christian example com;wim example com;" +
               "helen example com;geraldine example com");
 
-      void* account_handle = this._tp_backend.add_account ("protocol",
+      this.account_handle = ((!) this.tp_backend).add_account ("protocol",
           "me example com", "cm", "account");
 
       /* We expect two non-user individuals (each containing four Telepathy
@@ -416,8 +412,7 @@ public class AggregationTests : Folks.TestCase
       assert (set_in_use.size == 0);
 
       /* Clean up for the next test */
-      this._tp_backend.remove_account (account_handle);
-      this._kf_backend.tear_down ();
+      ((!) this.tp_backend).remove_account ((!) this.account_handle);
       aggregator = null;
     }
 
@@ -432,7 +427,7 @@ public class AggregationTests : Folks.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._kf_backend.set_up ("[0]\n" +
+      ((!) this.kf_backend).set_up ("[0]\n" +
           "protocol=travis example com;olivier example com;" +
               "guillaume example com;sjoerd example com\n" +
           "protocol2=christian example com;wim example com;" +
@@ -443,9 +438,10 @@ public class AggregationTests : Folks.TestCase
           "protocol2=travis example com;olivier example com;" +
               "guillaume example com;sjoerd example com");
 
-      void* account1_handle = this._tp_backend.add_account ("protocol",
+      var tp_backend = (!) this.tp_backend;
+      void* account1_handle = tp_backend.add_account ("protocol",
           "me example com", "cm", "account");
-      void* account2_handle = this._tp_backend.add_account ("protocol2",
+      void* account2_handle = tp_backend.add_account ("protocol2",
           "me example com", "cm", "account2");
 
       /* We expect two non-user individuals (each containing four Telepathy
@@ -556,9 +552,8 @@ public class AggregationTests : Folks.TestCase
       assert (expected_personas2_detailed.size == 0);
 
       /* Clean up for the next test */
-      this._tp_backend.remove_account (account2_handle);
-      this._tp_backend.remove_account (account1_handle);
-      this._kf_backend.tear_down ();
+      tp_backend.remove_account (account2_handle);
+      tp_backend.remove_account (account1_handle);
       aggregator = null;
     }
 
@@ -628,11 +623,12 @@ public class AggregationTests : Folks.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._kf_backend.set_up ("");
+      ((!) this.kf_backend).set_up ("");
 
-      void* account1_handle = this._tp_backend.add_account ("protocol",
+      var tp_backend = (!) this.tp_backend;
+      void* account1_handle = tp_backend.add_account ("protocol",
           "me example com", "cm", "account");
-      void* account2_handle = this._tp_backend.add_account ("protocol",
+      void* account2_handle = tp_backend.add_account ("protocol",
           "me2 example com", "cm", "account2");
 
       Individual user_individual = null;
@@ -717,9 +713,8 @@ public class AggregationTests : Folks.TestCase
       aggregator.disconnect (individuals_changed_detailed_id);
 
       /* Clean up for the next test */
-      this._tp_backend.remove_account (account2_handle);
-      this._tp_backend.remove_account (account1_handle);
-      this._kf_backend.tear_down ();
+      tp_backend.remove_account (account2_handle);
+      tp_backend.remove_account (account1_handle);
       aggregator = null;
     }
 
@@ -766,11 +761,12 @@ public class AggregationTests : Folks.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._kf_backend.set_up ("");
+      ((!) this.kf_backend).set_up ("");
 
-      void* account1_handle = this._tp_backend.add_account ("irc",
+      var tp_backend = (!) this.tp_backend;
+      void* account1_handle = tp_backend.add_account ("irc",
           "me example com", "cm", "account");
-      void* account2_handle = this._tp_backend.add_account ("irc",
+      void* account2_handle = tp_backend.add_account ("irc",
           "me2 example com", "cm", "account2");
 
       /* Set up the aggregator */
@@ -824,9 +820,8 @@ public class AggregationTests : Folks.TestCase
       aggregator.disconnect (individuals_changed_detailed_id);
 
       /* Clean up for the next test */
-      this._tp_backend.remove_account (account2_handle);
-      this._tp_backend.remove_account (account1_handle);
-      this._kf_backend.tear_down ();
+      tp_backend.remove_account (account2_handle);
+      tp_backend.remove_account (account1_handle);
       aggregator = null;
     }
 
@@ -876,14 +871,14 @@ public class AggregationTests : Folks.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._kf_backend.set_up ("[0]\n" +
+      ((!) this.kf_backend).set_up ("[0]\n" +
           "protocol=travis example com;olivier example com;" +
               "guillaume example com;sjoerd example com\n" +
           "[1]\n" +
           "protocol=christian example com;wim example com;" +
               "helen example com;geraldine example com");
 
-      void* account_handle = this._tp_backend.add_account ("protocol",
+      this.account_handle = ((!) this.tp_backend).add_account ("protocol",
           "me example com", "cm", "account");
 
       /* Weakly track all the individuals we see, and assert that they're
@@ -985,8 +980,8 @@ public class AggregationTests : Folks.TestCase
         }
 
       /* Remove all the individuals (hopefully) */
-      this._tp_backend.remove_account (account_handle);
-      this._kf_backend.tear_down ();
+      ((!) this.tp_backend).remove_account ((!) account_handle);
+      ((!) this.kf_backend).tear_down ();
       aggregator_is_finalising = true;
       aggregator = null;
 
@@ -1019,7 +1014,7 @@ public class AggregationTests : Folks.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._kf_backend.set_up ("[0]\n" +
+      ((!) this.kf_backend).set_up ("[0]\n" +
           "protocol=travis example com\n");
 
       Individual? individual = null;
@@ -1125,7 +1120,6 @@ public class AggregationTests : Folks.TestCase
       assert (writeable_persona == persona);
 
       /* Clean up for the next test */
-      this._kf_backend.tear_down ();
       aggregator = null;
     }
 
@@ -1143,8 +1137,8 @@ public class AggregationTests : Folks.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._kf_backend.set_up ("");
-      void* account_handle = this._tp_backend.add_account ("protocol",
+      ((!) this.kf_backend).set_up ("");
+      this.account_handle = ((!) this.tp_backend).add_account ("protocol",
           "me example com", "cm", "account");
 
       Individual? individual = null;
@@ -1311,8 +1305,6 @@ public class AggregationTests : Folks.TestCase
       assert (writeable_persona != persona);
 
       /* Clean up for the next test */
-      this._tp_backend.remove_account (account_handle);
-      this._kf_backend.tear_down ();
       individual = null;
       persona = null;
       writeable_persona = null;
@@ -1332,7 +1324,7 @@ public class AggregationTests : Folks.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._kf_backend.set_up ("[0]\n" +
+      ((!) this.kf_backend).set_up ("[0]\n" +
           "protocol=travis example com\n");
 
       Individual? individual = null;
@@ -1441,7 +1433,6 @@ public class AggregationTests : Folks.TestCase
       assert (writeable_persona == null);
 
       /* Clean up for the next test */
-      this._kf_backend.tear_down ();
       aggregator = null;
     }
 }
diff --git a/tests/folks/async-locking.vala b/tests/folks/async-locking.vala
index fd424fe..fdd203b 100644
--- a/tests/folks/async-locking.vala
+++ b/tests/folks/async-locking.vala
@@ -22,15 +22,12 @@ public class AsyncLockingTests : Folks.TestCase
 
   public override void set_up ()
     {
+      base.set_up ();
       this._counter = 0;
       this._calls_pending = 0;
       this._counter_increment_pending = false;
     }
 
-  public override void tear_down ()
-    {
-    }
-
   public void test_many_concurrent_funcs ()
     {
       _loop = new GLib.MainLoop (null, false);
diff --git a/tests/folks/avatar-cache.vala b/tests/folks/avatar-cache.vala
index 8090ec0..37e63fa 100644
--- a/tests/folks/avatar-cache.vala
+++ b/tests/folks/avatar-cache.vala
@@ -53,6 +53,7 @@ public class AvatarCacheTests : Folks.TestCase
 
   public override void set_up ()
     {
+      base.set_up ();
       this._delete_cache_directory ();
 
       this._cache = AvatarCache.dup ();
@@ -69,6 +70,7 @@ public class AvatarCacheTests : Folks.TestCase
       this._avatar = null;
       this._cache = null;
       this._delete_cache_directory ();
+      base.tear_down ();
     }
 
   protected void _delete_directory (File dir) throws GLib.Error
diff --git a/tests/folks/backend-loading.vala b/tests/folks/backend-loading.vala
index 30d4363..d40be7a 100644
--- a/tests/folks/backend-loading.vala
+++ b/tests/folks/backend-loading.vala
@@ -20,10 +20,8 @@
 using Gee;
 using Folks;
 
-public class BackendLoadingTests : Folks.TestCase
+public class BackendLoadingTests : TpfTest.MixedTestCase
 {
-  private TpTests.Backend _tp_backend;
-  private void* _account_handle;
   private MainLoop main_loop;
   private static const string STORE_FILE_PATH = "folks-test-backend-store.ini";
 
@@ -31,8 +29,6 @@ public class BackendLoadingTests : Folks.TestCase
     {
       base ("BackendLoading");
 
-      this._tp_backend = new TpTests.Backend ();
-
       this.add_test ("load and prep", this.test_load_and_prep);
       this.add_test ("disabling", this.test_disabling);
       this.add_test ("reloading", this.test_reloading);
@@ -40,9 +36,7 @@ public class BackendLoadingTests : Folks.TestCase
 
   public override void set_up ()
     {
-      this._tp_backend.set_up ();
-      this._account_handle = this._tp_backend.add_account ("protocol",
-          "me example com", "cm", "account");
+      base.set_up ();
 
       /* Use a temporary key file for the BackendStore */
       var kf_path = Path.build_filename (Environment.get_tmp_dir (),
@@ -78,8 +72,7 @@ public class BackendLoadingTests : Folks.TestCase
       FileUtils.remove (Path.build_filename (Environment.get_tmp_dir (),
           this.STORE_FILE_PATH, null));
 
-      this._tp_backend.remove_account (this._account_handle);
-      this._tp_backend.tear_down ();
+      base.tear_down ();
     }
 
   public void test_load_and_prep ()
diff --git a/tests/folks/init.vala b/tests/folks/init.vala
index 9e37775..8d7fb9d 100644
--- a/tests/folks/init.vala
+++ b/tests/folks/init.vala
@@ -21,32 +21,28 @@
 using Gee;
 using Folks;
 
-public class InitTests : Folks.TestCase
+public class InitTests : TpfTest.MixedTestCase
 {
-  private KfTest.Backend _kf_backend;
-  private TpTests.Backend _tp_backend;
   private int _test_timeout = 5;
 
   public InitTests ()
     {
       base ("Init");
 
-      this._kf_backend = new KfTest.Backend ();
-      this._tp_backend = new TpTests.Backend ();
-
       /* Set up the tests */
       this.add_test ("looped", this.test_looped);
       this.add_test ("individual-count", this.test_individual_count);
     }
 
-  public override void set_up ()
+  public override void set_up_kf ()
     {
-      this._tp_backend.set_up ();
+      /* we do this in the individual tests */
     }
 
-  public override void tear_down ()
+  public override void set_up_tp ()
     {
-      this._tp_backend.tear_down ();
+      /* we do the account creation in the individual tests */
+      ((!) this.tp_backend).set_up ();
     }
 
   /* Prepare a load of aggregators in a tight loop, without waiting for any of
@@ -57,11 +53,12 @@ public class InitTests : Folks.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._kf_backend.set_up ("");
+      ((!) this.kf_backend).set_up ("");
 
-      void* account1_handle = this._tp_backend.add_account ("protocol",
+      var tp_backend = (!) this.tp_backend;
+      void* account1_handle = tp_backend.add_account ("protocol",
           "me example com", "cm", "account");
-      void* account2_handle = this._tp_backend.add_account ("protocol",
+      void* account2_handle = tp_backend.add_account ("protocol",
           "me2 example com", "cm", "account2");
 
       /* Wreak havoc. */
@@ -82,9 +79,8 @@ public class InitTests : Folks.TestCase
       main_loop.run ();
 
       /* Clean up for the next test */
-      this._tp_backend.remove_account (account2_handle);
-      this._tp_backend.remove_account (account1_handle);
-      this._kf_backend.tear_down ();
+      tp_backend.remove_account (account2_handle);
+      tp_backend.remove_account (account1_handle);
     }
 
   /* Prepare an aggregator and wait for quiescence, then count how many
@@ -99,16 +95,17 @@ public class InitTests : Folks.TestCase
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._kf_backend.set_up (
+      ((!) this.kf_backend).set_up (
           "[0]\n" +
           "msn=foo hotmail com\n" +
           "[1]\n" +
           "__alias=Bar McBadgerson\n" +
           "jabber=bar jabber org\n");
 
-      void* account1_handle = this._tp_backend.add_account ("protocol",
+      var tp_backend = (!) this.tp_backend;
+      void* account1_handle = tp_backend.add_account ("protocol",
           "me example com", "cm", "account");
-      void* account2_handle = this._tp_backend.add_account ("protocol",
+      void* account2_handle = tp_backend.add_account ("protocol",
           "me2 example com", "cm", "account2");
 
       /* Run the test loop. */
@@ -126,10 +123,8 @@ public class InitTests : Folks.TestCase
       main_loop.run ();
 
       /* Clean up for the next test */
-      this._tp_backend.remove_account (account2_handle);
-      this._tp_backend.remove_account (account1_handle);
-
-      this._kf_backend.tear_down ();
+      tp_backend.remove_account (account2_handle);
+      tp_backend.remove_account (account1_handle);
     }
 
   private async void _test_individual_count_loop ()
diff --git a/tests/folks/object-cache.vala b/tests/folks/object-cache.vala
index efdb0ff..dd48937 100644
--- a/tests/folks/object-cache.vala
+++ b/tests/folks/object-cache.vala
@@ -94,12 +94,14 @@ public class ObjectCacheTests : Folks.TestCase
 
   public override void set_up ()
     {
+      base.set_up ();
       this._delete_cache_directory ();
     }
 
   public override void tear_down ()
     {
       this._delete_cache_directory ();
+      base.tear_down ();
     }
 
   protected void _delete_directory (File dir) throws GLib.Error
diff --git a/tests/folks/utils.vala b/tests/folks/utils.vala
index 506d977..cf3616d 100644
--- a/tests/folks/utils.vala
+++ b/tests/folks/utils.vala
@@ -28,14 +28,6 @@ public class UtilsTests : Folks.TestCase
       this.add_test ("MultiMap equality", this.test_multi_map_equality);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_multi_map_equality ()
     {
       var a_1 = new HashMultiMap<string, string> ();
diff --git a/tests/key-file/individual-retrieval.vala b/tests/key-file/individual-retrieval.vala
index 45b7c67..e4afc2b 100644
--- a/tests/key-file/individual-retrieval.vala
+++ b/tests/key-file/individual-retrieval.vala
@@ -21,17 +21,14 @@ using Gee;
 using Folks;
 using KfTest;
 
-public class IndividualRetrievalTests : Folks.TestCase
+public class IndividualRetrievalTests : KfTest.TestCase
 {
-  private KfTest.Backend kf_backend;
   private int _test_timeout = 3;
 
   public IndividualRetrievalTests ()
     {
       base ("IndividualRetrieval");
 
-      this.kf_backend = new KfTest.Backend ();
-
       this.add_test ("singleton individuals", this.test_singleton_individuals);
       this.add_test ("aliases", this.test_aliases);
 
@@ -39,14 +36,6 @@ public class IndividualRetrievalTests : Folks.TestCase
           this._test_timeout = 10;
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_singleton_individuals ()
     {
       var main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am
index 178d67b..5a6908b 100644
--- a/tests/lib/Makefile.am
+++ b/tests/lib/Makefile.am
@@ -1,4 +1,6 @@
+# Build . first so that backends' test libraries can link to libfolks-test.la
 SUBDIRS = \
+       . \
        key-file \
        $(NULL)
 
@@ -54,7 +56,8 @@ libfolks_test_la_LIBADD = \
 libfolks_test_la_VALAFLAGS = \
        $(ERROR_VALAFLAGS) \
        $(AM_VALAFLAGS) \
-       --vapidir=$(top_srcdir)/folks \
+       --vapidir=$(abs_top_srcdir)/folks \
+       --vapidir=$(abs_top_builddir)/folks \
        --pkg gobject-2.0 \
        --pkg gio-2.0 \
        --pkg gee-0.8 \
@@ -72,6 +75,7 @@ MAINTAINERCLEANFILES = \
        $(NULL)
 
 EXTRA_DIST = \
+       folks-test.deps \
        $(MAINTAINERCLEANFILES) \
        $(NULL)
 
diff --git a/tests/lib/eds/Makefile.am b/tests/lib/eds/Makefile.am
index b87f85b..c2cb103 100644
--- a/tests/lib/eds/Makefile.am
+++ b/tests/lib/eds/Makefile.am
@@ -5,6 +5,8 @@ AM_VALAFLAGS += \
        --vapidir=$(top_srcdir)/folks \
        --vapidir=$(top_srcdir)/backends/eds/lib \
        --vapidir=$(top_srcdir)/backends/eds/vapi \
+       --vapidir=$(abs_top_srcdir)/tests/lib \
+       --vapidir=$(abs_top_builddir)/tests/lib \
        --vapidir=. \
        --pkg gobject-2.0 \
        --pkg gio-2.0 \
@@ -14,6 +16,7 @@ AM_VALAFLAGS += \
        --pkg libedataserver-1.2 \
        --pkg libxml-2.0 \
        --pkg folks-eds \
+       --pkg folks-test \
        -g \
        $(NULL)
 
@@ -21,6 +24,7 @@ noinst_LTLIBRARIES = libeds-test.la
 
 libeds_test_la_SOURCES = \
        backend.vala \
+       test-case.vala \
        $(NULL)
 
 libeds_test_la_CFLAGS = \
@@ -32,11 +36,13 @@ libeds_test_la_CFLAGS = \
        -I$(top_srcdir)/folks \
        -I$(top_srcdir)/backends/eds/lib \
        -I$(top_srcdir)/backends/eds/lib/folks \
+       -I$(top_srcdir)/tests/lib \
        $(NULL)
 
 libeds_test_la_LIBADD = \
        $(top_builddir)/folks/libfolks.la \
        $(top_builddir)/backends/eds/lib/libfolks-eds.la \
+       $(top_builddir)/tests/lib/libfolks-test.la \
        $(EBOOK_LIBS) \
        $(EDATASERVER_LIBS) \
        $(GLIB_LIBS) \
diff --git a/tests/lib/eds/test-case.vala b/tests/lib/eds/test-case.vala
new file mode 100644
index 0000000..ded678a
--- /dev/null
+++ b/tests/lib/eds/test-case.vala
@@ -0,0 +1,66 @@
+/* test-case.vala
+ *
+ * Copyright © 2011 Collabora Ltd.
+ * Copyright © 2013 Intel Corporation
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Author:
+ *      Raul Gutierrez Segales <raul gutierrez segales collabora co uk>
+ *      Simon McVittie <simon mcvittie collabora co uk>
+ */
+
+public class EdsTest.TestCase : Folks.TestCase
+{
+  public EdsTest.Backend eds_backend;
+
+  public TestCase (string name)
+    {
+      base (name);
+    }
+
+  public override void set_up ()
+    {
+      base.set_up ();
+      this.create_backend ();
+      this.configure_primary_store ();
+    }
+
+  public virtual void create_backend ()
+    {
+      this.eds_backend = new EdsTest.Backend ();
+      this.eds_backend.set_up ();
+    }
+
+  public virtual void configure_primary_store ()
+    {
+      /* By default, configure EDS as the primary store. */
+      var config_val = "eds:%s".printf (this.eds_backend.address_book_uid);
+      Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
+    }
+
+  public override void tear_down ()
+    {
+      if (this.eds_backend != null)
+        {
+          ((!) this.eds_backend).tear_down ();
+          this.eds_backend = null;
+        }
+
+      Environment.unset_variable ("FOLKS_PRIMARY_STORE");
+
+      base.tear_down ();
+    }
+}
diff --git a/tests/lib/folks-test.deps b/tests/lib/folks-test.deps
new file mode 100644
index 0000000..5a653b7
--- /dev/null
+++ b/tests/lib/folks-test.deps
@@ -0,0 +1,5 @@
+glib-2.0
+gobject-2.0
+gio-2.0
+gee-0.8
+folks
diff --git a/tests/lib/key-file/Makefile.am b/tests/lib/key-file/Makefile.am
index 24892d1..fe53b41 100644
--- a/tests/lib/key-file/Makefile.am
+++ b/tests/lib/key-file/Makefile.am
@@ -2,7 +2,13 @@ AM_VALAFLAGS += \
        $(ERROR_VALAFLAGS) \
        --library=kf-test \
        --header=kf-test.h \
-       --vapidir=. \
+       --vapidir=$(abs_srcdir) \
+       --vapidir=$(abs_builddir) \
+       --vapidir=$(abs_top_srcdir)/folks \
+       --vapidir=$(abs_top_builddir)/folks \
+       --vapidir=$(abs_top_srcdir)/tests/lib \
+       --vapidir=$(abs_top_builddir)/tests/lib \
+       --pkg folks-test \
        -g \
        $(NULL)
 
@@ -10,14 +16,20 @@ noinst_LTLIBRARIES = libkf-test.la
 
 libkf_test_la_SOURCES = \
        backend.vala \
+       test-case.vala \
        $(NULL)
 
 libkf_test_la_CFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/tests/lib \
        $(GLIB_CFLAGS) \
+       $(GEE_CFLAGS) \
        $(NULL)
 
 libkf_test_la_LIBADD = \
+       $(top_builddir)/tests/lib/libfolks-test.la \
        $(GLIB_LIBS) \
+       $(GEE_LIBS) \
        $(NULL)
 
 MAINTAINERCLEANFILES = \
@@ -26,6 +38,7 @@ MAINTAINERCLEANFILES = \
        $(NULL)
 
 EXTRA_DIST = \
+       kf-test.deps \
        kf-test.vapi \
        kf-test.h \
        $(NULL)
diff --git a/tests/lib/key-file/kf-test.deps b/tests/lib/key-file/kf-test.deps
new file mode 100644
index 0000000..5a653b7
--- /dev/null
+++ b/tests/lib/key-file/kf-test.deps
@@ -0,0 +1,5 @@
+glib-2.0
+gobject-2.0
+gio-2.0
+gee-0.8
+folks
diff --git a/tests/lib/key-file/test-case.vala b/tests/lib/key-file/test-case.vala
new file mode 100644
index 0000000..ee991d7
--- /dev/null
+++ b/tests/lib/key-file/test-case.vala
@@ -0,0 +1,33 @@
+/* test-case.vala
+ *
+ * Copyright © 2013 Intel Corporation
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Author:
+ *      Simon McVittie <simon mcvittie collabora co uk>
+ */
+
+public class KfTest.TestCase : Folks.TestCase
+{
+  public KfTest.Backend kf_backend;
+
+  public TestCase (string name)
+    {
+      base (name);
+
+      this.kf_backend = new KfTest.Backend ();
+    }
+}
diff --git a/tests/lib/libsocialweb/Makefile.am b/tests/lib/libsocialweb/Makefile.am
index 6f6d6a4..f1bf8ce 100644
--- a/tests/lib/libsocialweb/Makefile.am
+++ b/tests/lib/libsocialweb/Makefile.am
@@ -4,6 +4,8 @@ AM_VALAFLAGS += \
        --header=libsocialweb-test.h \
        --vapidir=$(top_srcdir)/folks \
        --vapidir=$(top_srcdir)/backends/libsocialweb/lib \
+       --vapidir=$(abs_top_srcdir)/tests/lib \
+       --vapidir=$(abs_top_builddir)/tests/lib \
        --vapidir=. \
        --pkg gobject-2.0 \
        --pkg gio-2.0 \
@@ -11,6 +13,7 @@ AM_VALAFLAGS += \
        --pkg folks \
        --pkg libsocialweb-client \
        --pkg folks-libsocialweb \
+       --pkg folks-test \
        -g \
        $(NULL)
 
@@ -18,13 +21,16 @@ noinst_LTLIBRARIES = libsocialweb-test.la
 
 libsocialweb_test_la_SOURCES = \
        backend.vala \
+       test-case.vala \
        $(NULL)
 
 libsocialweb_test_la_CFLAGS = \
        $(GLIB_CFLAGS) \
        $(GIO_CFLAGS) \
        $(GEE_CFLAGS) \
+       -I$(top_srcdir) \
        -I$(top_srcdir)/backends/libsocialweb/lib \
+       -I$(top_srcdir)/tests/lib \
        $(NULL)
 
 libsocialweb_test_la_LIBADD = \
@@ -33,6 +39,7 @@ libsocialweb_test_la_LIBADD = \
        $(GEE_LIBS) \
        $(top_builddir)/folks/libfolks.la \
        $(top_builddir)/backends/libsocialweb/lib/libfolks-libsocialweb.la \
+       $(top_builddir)/tests/lib/libfolks-test.la \
        $(NULL)
 
 MAINTAINERCLEANFILES = \
diff --git a/tests/lib/libsocialweb/test-case.vala b/tests/lib/libsocialweb/test-case.vala
new file mode 100644
index 0000000..285d39b
--- /dev/null
+++ b/tests/lib/libsocialweb/test-case.vala
@@ -0,0 +1,70 @@
+/* test-case.vala
+ *
+ * Copyright © 2011 Collabora Ltd.
+ * Copyright © 2013 Intel Corporation
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Authors:
+ *      Alban Crequy <alban crequy collabora co uk>
+ *      Simon McVittie <simon mcvittie collabora co uk>
+ */
+
+public class LibsocialwebTest.TestCase : Folks.TestCase
+{
+  public LibsocialwebTest.Backend? lsw_backend = null;
+
+  public TestCase (string name)
+    {
+      base (name);
+
+      this.lsw_backend = new LibsocialwebTest.Backend ();
+    }
+
+  public override void set_up ()
+    {
+      base.set_up ();
+
+      if (this.lsw_backend != null)
+        {
+          var lsw_backend = (!) this.lsw_backend;
+
+          var main_loop = new GLib.MainLoop (null, false);
+
+          this.lsw_backend.ready.connect (() =>
+            {
+              main_loop.quit ();
+            });
+          uint timer_id = Timeout.add_seconds (5, () =>
+            {
+              assert_not_reached ();
+            });
+
+          lsw_backend.set_up ();
+          main_loop.run ();
+          Source.remove (timer_id);
+        }
+    }
+
+  public override void tear_down ()
+    {
+      if (this.lsw_backend != null)
+        {
+          ((!) this.lsw_backend).tear_down ();
+        }
+
+      base.tear_down ();
+    }
+}
diff --git a/tests/lib/telepathy/Makefile.am b/tests/lib/telepathy/Makefile.am
index 6a855c1..0986476 100644
--- a/tests/lib/telepathy/Makefile.am
+++ b/tests/lib/telepathy/Makefile.am
@@ -2,4 +2,69 @@ SUBDIRS = \
         contactlist \
         $(NULL)
 
+AM_VALAFLAGS += \
+       $(ERROR_VALAFLAGS) \
+       --library=tpf-test \
+       --header=tpf-test.h \
+       --vapidir=$(abs_srcdir) \
+       --vapidir=$(abs_builddir) \
+       --vapidir=$(abs_srcdir)/contactlist \
+       --vapidir=$(abs_builddir)/contactlist \
+       --vapidir=$(abs_top_srcdir)/folks \
+       --vapidir=$(abs_top_builddir)/folks \
+       --vapidir=$(abs_top_srcdir)/tests/lib \
+       --vapidir=$(abs_top_builddir)/tests/lib \
+       --vapidir=$(abs_top_srcdir)/tests/lib/key-file \
+       --vapidir=$(abs_top_builddir)/tests/lib/key-file \
+       --pkg folks-test \
+       --pkg kf-test \
+       --pkg tp-test-contactlist \
+       -g \
+       $(NULL)
+
+noinst_LTLIBRARIES = libtpf-test.la
+
+libtpf_test_la_SOURCES = \
+       test-case.vala \
+       $(NULL)
+
+libtpf_test_la_CFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/tests/lib \
+       -I$(top_srcdir)/tests/lib/key-file \
+       -I$(srcdir)/contactlist \
+       $(GLIB_CFLAGS) \
+       $(GEE_CFLAGS) \
+       $(TP_GLIB_CFLAGS) \
+       $(NULL)
+
+libtpf_test_la_LIBADD = \
+       $(top_builddir)/tests/lib/libfolks-test.la \
+       $(top_builddir)/tests/lib/key-file/libkf-test.la \
+       contactlist/libtp-test-contactlist.la \
+       $(GLIB_LIBS) \
+       $(GEE_LIBS) \
+       $(TP_GLIB_LIBS) \
+       $(NULL)
+
+MAINTAINERCLEANFILES = \
+       tpf-test.vapi \
+       tpf-test.h \
+       $(NULL)
+
+EXTRA_DIST = \
+       tpf-test.deps \
+       tpf-test.vapi \
+       tpf-test.h \
+       $(NULL)
+
+BUILT_SOURCES = \
+       libtpf_test_la_vala.stamp \
+       $(NULL)
+
+GITIGNOREFILES = \
+       $(libtpf_test_la_SOURCES:.vala=.c) \
+       libtpf_test_la_vala.stamp \
+       $(NULL)
+
 -include $(top_srcdir)/git.mk
diff --git a/tests/lib/telepathy/contactlist/backend.c b/tests/lib/telepathy/contactlist/backend.c
index da97d07..b7193dc 100644
--- a/tests/lib/telepathy/contactlist/backend.c
+++ b/tests/lib/telepathy/contactlist/backend.c
@@ -357,6 +357,12 @@ tp_tests_backend_tear_down (TpTestsBackend *self)
   TpTestsBackendPrivate *priv = self->priv;
   GError *error = NULL;
 
+  if (priv->daemon == NULL)
+    {
+      /* already torn down */
+      return;
+    }
+
   /* Make sure all dbus trafic with AM is done */
   tp_tests_proxy_run_until_dbus_queue_processed (priv->client_am);
   g_clear_object (&priv->client_am);
diff --git a/tests/lib/telepathy/test-case.vala b/tests/lib/telepathy/test-case.vala
new file mode 100644
index 0000000..d57a21a
--- /dev/null
+++ b/tests/lib/telepathy/test-case.vala
@@ -0,0 +1,121 @@
+/* test-case.vala
+ *
+ * Copyright © 2011 Collabora Ltd.
+ * Copyright © 2013 Intel Corporation
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Authors:
+ *      Travis Reitter <travis reitter collabora co uk>
+ *      Simon McVittie <simon mcvittie collabora co uk>
+ */
+
+public class TpfTest.TestCase : Folks.TestCase
+{
+  public KfTest.Backend? kf_backend = null;
+  public TpTests.Backend? tp_backend = null;
+  public void *account_handle = null;
+
+  public virtual bool use_keyfile_too
+    {
+      get
+        {
+          return false;
+        }
+    }
+
+  public TestCase (string name)
+    {
+      base (name);
+
+      this.create_kf_backend ();
+      this.create_tp_backend ();
+    }
+
+  public virtual void create_kf_backend ()
+    {
+      if (use_keyfile_too)
+        this.kf_backend = new KfTest.Backend ();
+    }
+
+  public virtual void create_tp_backend ()
+    {
+      this.tp_backend = new TpTests.Backend ();
+    }
+
+  public override void set_up ()
+    {
+      base.set_up ();
+      this.set_up_tp ();
+      this.set_up_kf ();
+    }
+
+  public virtual void set_up_tp ()
+    {
+      if (this.tp_backend != null)
+        {
+          var tp_backend = (!) this.tp_backend;
+
+          tp_backend.set_up ();
+          this.account_handle = tp_backend.add_account ("protocol",
+              "me example com", "cm", "account");
+        }
+    }
+
+  public virtual void set_up_kf ()
+    {
+      if (this.kf_backend != null)
+        ((!) this.kf_backend).set_up ("");
+    }
+
+  public override void tear_down ()
+    {
+      if (this.tp_backend != null)
+        {
+          var tp_backend = (!) this.tp_backend;
+
+          if (this.account_handle != null)
+            {
+              tp_backend.remove_account (account_handle);
+              this.account_handle = null;
+            }
+
+          tp_backend.tear_down ();
+        }
+
+      if (this.kf_backend != null)
+        {
+          ((!) this.kf_backend).tear_down ();
+        }
+
+      base.tear_down ();
+    }
+}
+
+public class TpfTest.MixedTestCase : TpfTest.TestCase
+{
+  public override bool use_keyfile_too
+    {
+      get
+        {
+          return true;
+        }
+    }
+
+  public MixedTestCase (string name)
+    {
+      base (name);
+    }
+}
diff --git a/tests/lib/telepathy/tpf-test.deps b/tests/lib/telepathy/tpf-test.deps
new file mode 100644
index 0000000..1bce19e
--- /dev/null
+++ b/tests/lib/telepathy/tpf-test.deps
@@ -0,0 +1,7 @@
+glib-2.0
+gobject-2.0
+gio-2.0
+gee-0.8
+folks
+telepathy-glib
+tp-test-contactlist
diff --git a/tests/lib/test-case.vala b/tests/lib/test-case.vala
index edac2d3..f344d77 100644
--- a/tests/lib/test-case.vala
+++ b/tests/lib/test-case.vala
@@ -1,6 +1,7 @@
 /* testcase.vala
  *
  * Copyright (C) 2009 Julien Peeters
+ * Copyright (C) 2013 Intel Corporation
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -18,6 +19,7 @@
  *
  * Author:
  *     Julien Peeters <contact julienpeeters fr>
+ *     Simon McVittie <simon mcvittie collabora co uk>
  *
  * Copied from libgee/tests/testcase.vala.
  */
@@ -43,14 +45,30 @@ public abstract class Folks.TestCase : Object
             adaptor.name, adaptor.set_up, adaptor.run, adaptor.tear_down));
     }
 
+  /* Set up for one test. If you have more than one test case, this will
+   * be called once per test. */
   public virtual void set_up ()
     {
     }
 
+  /* Clean up after one test. If you have more than one test case, this will
+   * be called once per test. It should undo set_up (). */
   public virtual void tear_down ()
     {
     }
 
+  /* Clean up after all tests. If you have more than one test case, this
+   * will be called once, the last time only. It should undo the
+   * constructor, and must be idempotent (i.e. OK to call more than once). */
+  public virtual void final_tear_down ()
+    {
+    }
+
+  ~TestCase ()
+    {
+      this.final_tear_down ();
+    }
+
   public GLib.TestSuite get_suite ()
     {
       return this._suite;
diff --git a/tests/lib/tracker/Makefile.am b/tests/lib/tracker/Makefile.am
index 0c2b45a..51c154a 100644
--- a/tests/lib/tracker/Makefile.am
+++ b/tests/lib/tracker/Makefile.am
@@ -4,6 +4,8 @@ AM_VALAFLAGS += \
        --header=tracker-test.h \
        --vapidir=$(top_srcdir)/folks \
        --vapidir=$(top_srcdir)/backends/tracker/lib \
+       --vapidir=$(abs_top_srcdir)/tests/lib \
+       --vapidir=$(abs_top_builddir)/tests/lib \
        --vapidir=. \
        --pkg gobject-2.0 \
        --pkg gio-2.0 \
@@ -11,6 +13,7 @@ AM_VALAFLAGS += \
        --pkg folks \
        --pkg tracker-sparql-$(TRACKER_SPARQL_MAJOR) \
        --pkg folks-tracker \
+       --pkg folks-test \
        -g \
        $(NULL)
 
@@ -18,6 +21,7 @@ noinst_LTLIBRARIES = libtracker-test.la
 
 libtracker_test_la_SOURCES = \
        backend.vala \
+       test-case.vala \
        $(NULL)
 
 libtracker_test_la_CFLAGS = \
@@ -28,6 +32,7 @@ libtracker_test_la_CFLAGS = \
        -I$(top_srcdir)/folks \
        -I$(top_srcdir)/backends/tracker/lib \
        -I$(top_srcdir)/backends/tracker/lib/folks \
+       -I$(top_srcdir)/tests/lib \
        $(NULL)
 
 libtracker_test_la_LIBADD = \
@@ -36,6 +41,7 @@ libtracker_test_la_LIBADD = \
        $(TRACKER_SPARQL_LIBS) \
        $(top_builddir)/folks/libfolks.la \
        $(top_builddir)/backends/tracker/lib/libfolks-tracker.la \
+       $(top_builddir)/tests/lib/libfolks-test.la \
        $(NULL)
 
 # XXX: automake's Vala support should make these unnecessary
diff --git a/tests/lib/tracker/test-case.vala b/tests/lib/tracker/test-case.vala
new file mode 100644
index 0000000..872a32f
--- /dev/null
+++ b/tests/lib/tracker/test-case.vala
@@ -0,0 +1,43 @@
+/* test-case.vala
+ *
+ * Copyright © 2013 Intel Corporation
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ *
+ * Author:
+ *      Simon McVittie <simon mcvittie collabora co uk>
+ */
+
+public class TrackerTest.TestCase : Folks.TestCase
+{
+  public TrackerTest.Backend? tracker_backend = null;
+
+  public TestCase (string name)
+    {
+      base (name);
+
+      this.tracker_backend = new TrackerTest.Backend ();
+    }
+
+  public override void tear_down ()
+    {
+      if (this.tracker_backend != null)
+        {
+          ((!) this.tracker_backend).tear_down ();
+        }
+
+      base.tear_down ();
+    }
+}
diff --git a/tests/libsocialweb/aggregation.vala b/tests/libsocialweb/aggregation.vala
index 37d966a..ab764fc 100644
--- a/tests/libsocialweb/aggregation.vala
+++ b/tests/libsocialweb/aggregation.vala
@@ -23,9 +23,8 @@ using Folks;
 using Gee;
 using GLib;
 
-public class AggregationTests : Folks.TestCase
+public class AggregationTests : LibsocialwebTest.TestCase
 {
-  private LibsocialwebTest.Backend _lsw_backend;
   private static const string STORE_FILE_PATH =
       "folks-test-libsocialweb-aggregation-store.ini";
   private static const string KF_RELATIONSHIPS_FILE_PATH =
@@ -35,8 +34,6 @@ public class AggregationTests : Folks.TestCase
     {
       base ("Aggregation");
 
-      this._lsw_backend = new LibsocialwebTest.Backend ();
-
       this.add_test ("libsocialweb aggregation", this.test_aggregation_libsocialweb);
     }
 
@@ -90,30 +87,17 @@ public class AggregationTests : Folks.TestCase
 
       Environment.set_variable ("FOLKS_BACKEND_STORE_KEY_FILE_PATH",
           kf_path, true);
-    }
 
-  public override void tear_down ()
-    {
+      /* Chain up to set up the LSW backend */
+      base.set_up ();
     }
 
   public void test_aggregation_libsocialweb ()
     {
       var main_loop = new GLib.MainLoop (null, false);
-
-      this._lsw_backend.ready.connect(() =>
-        {
-          main_loop.quit ();
-        });
-      uint timer_id = Timeout.add_seconds (5, () =>
-        {
-          assert_not_reached ();
-        });
-      this._lsw_backend.set_up ();
-      main_loop.run ();
-      Source.remove (timer_id);
-
-      var mysocialnetwork1 = this._lsw_backend.add_service ("mysocialnetwork1");
-      var mysocialnetwork2 = this._lsw_backend.add_service ("mysocialnetwork2");
+      var lsw_backend = (!) this.lsw_backend;
+      var mysocialnetwork1 = lsw_backend.add_service ("mysocialnetwork1");
+      var mysocialnetwork2 = lsw_backend.add_service ("mysocialnetwork2");
 
       /* Populate mysocialnetwork1 */
       mysocialnetwork1.OpenViewCalled.connect((query, p, path) =>
@@ -197,7 +181,7 @@ public class AggregationTests : Folks.TestCase
         });
       aggregator.prepare.begin ();
 
-      timer_id = Timeout.add_seconds (5, () =>
+      uint timer_id = Timeout.add_seconds (5, () =>
         {
           assert_not_reached ();
         });
@@ -278,8 +262,6 @@ public class AggregationTests : Folks.TestCase
         });
       main_loop.run ();
       Source.remove (timer_id);
-
-      this._lsw_backend.tear_down ();
     }
 }
 
diff --git a/tests/libsocialweb/dummy-lsw.vala b/tests/libsocialweb/dummy-lsw.vala
index 1f9505c..2e9afd5 100644
--- a/tests/libsocialweb/dummy-lsw.vala
+++ b/tests/libsocialweb/dummy-lsw.vala
@@ -24,44 +24,21 @@ using Gee;
 using GLib;
 using SocialWebClient;
 
-public class DummyLswTests : Folks.TestCase
+public class DummyLswTests : LibsocialwebTest.TestCase
 {
-  private LibsocialwebTest.Backend _lsw_backend;
-
   public DummyLswTests ()
     {
       base ("DummyLsw");
 
-      this._lsw_backend = new LibsocialwebTest.Backend ();
-
       this.add_test ("dummy libsocialweb", this.test_dummy_libsocialweb);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_dummy_libsocialweb ()
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      this._lsw_backend.ready.connect(() =>
-        {
-          main_loop.quit ();
-        });
-      uint timer_id = Timeout.add_seconds (5, () =>
-        {
-          assert_not_reached ();
-        });
-      this._lsw_backend.set_up ();
-      main_loop.run ();
-      Source.remove (timer_id);
-
-      var mysocialnetwork = this._lsw_backend.add_service ("mysocialnetwork");
+      var lsw_backend = (!) this.lsw_backend;
+      var mysocialnetwork = lsw_backend.add_service ("mysocialnetwork");
       var p = new GLib.HashTable<string,string> (null, null);
 
       try
@@ -89,8 +66,7 @@ public class DummyLswTests : Folks.TestCase
           assert_not_reached ();
         }
 
-
-      timer_id = Timeout.add_seconds (5, () =>
+      uint timer_id = Timeout.add_seconds (5, () =>
         {
           assert_not_reached ();
         });
@@ -299,8 +275,6 @@ public class DummyLswTests : Folks.TestCase
       main_loop.run ();
       Source.remove (timer_id);
       aggregator.disconnect (handler_id);
-
-      this._lsw_backend.tear_down ();
     }
 }
 
diff --git a/tests/telepathy/Makefile.am b/tests/telepathy/Makefile.am
index 6865c07..540fd7c 100644
--- a/tests/telepathy/Makefile.am
+++ b/tests/telepathy/Makefile.am
@@ -8,12 +8,16 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/backends/telepathy/lib \
        -I$(top_srcdir)/backends/telepathy/lib/folks \
        -I$(top_srcdir)/tests/lib \
+       -I$(top_srcdir)/tests/lib/key-file \
+       -I$(top_srcdir)/tests/lib/telepathy \
        -I$(top_srcdir)/tests/lib/telepathy/contactlist \
        -include $(CONFIG_HEADER) \
        $(NULL)
 
 LDADD = \
        $(top_builddir)/tests/lib/libfolks-test.la \
+       $(top_builddir)/tests/lib/key-file/libkf-test.la \
+       $(top_builddir)/tests/lib/telepathy/libtpf-test.la \
        $(top_builddir)/tests/lib/telepathy/contactlist/libtp-test-contactlist.la \
        $(top_builddir)/backends/telepathy/lib/libfolks-telepathy.la \
        $(top_builddir)/folks/libfolks.la \
@@ -30,6 +34,10 @@ AM_VALAFLAGS += \
        $(ERROR_VALAFLAGS) \
        --vapidir=$(abs_top_srcdir)/tests/lib/telepathy/contactlist/ \
        --vapidir=$(abs_top_builddir)/tests/lib/telepathy/contactlist/ \
+       --vapidir=$(abs_top_srcdir)/tests/lib/telepathy \
+       --vapidir=$(abs_top_builddir)/tests/lib/telepathy \
+       --vapidir=$(abs_top_srcdir)/tests/lib/key-file \
+       --vapidir=$(abs_top_builddir)/tests/lib/key-file \
        --vapidir=$(abs_top_srcdir)/tests/lib/ \
        --vapidir=$(abs_top_builddir)/tests/lib/ \
        --vapidir=$(abs_srcdir) \
@@ -46,6 +54,8 @@ AM_VALAFLAGS += \
        --pkg folks \
        --pkg folks-telepathy \
        --pkg folks-test \
+       --pkg kf-test \
+       --pkg tpf-test \
        --pkg tp-test-contactlist \
        -g \
        $(NULL)
diff --git a/tests/telepathy/individual-properties.vala b/tests/telepathy/individual-properties.vala
index 4922a4c..b8fb345 100644
--- a/tests/telepathy/individual-properties.vala
+++ b/tests/telepathy/individual-properties.vala
@@ -24,10 +24,8 @@ using Tpf;
 using Folks;
 using Gee;
 
-public class IndividualPropertiesTests : Folks.TestCase
+public class IndividualPropertiesTests : TpfTest.TestCase
 {
-  private TpTests.Backend tp_backend;
-  private void* _account_handle;
   private int _test_timeout = 3;
   private HashSet<string> _changes_pending;
 
@@ -35,8 +33,6 @@ public class IndividualPropertiesTests : Folks.TestCase
     {
       base ("IndividualProperties");
 
-      this.tp_backend = new TpTests.Backend ();
-
       this.add_test ("individual properties",
           this.test_individual_properties);
       this.add_test ("individual properties:change alias through tp backend",
@@ -52,16 +48,9 @@ public class IndividualPropertiesTests : Folks.TestCase
 
   public override void set_up ()
     {
-      this.tp_backend.set_up ();
-      this._account_handle = this.tp_backend.add_account ("protocol",
-          "me example com", "cm", "account");
-      this._changes_pending = new HashSet<string> ();
-    }
+      base.set_up ();
 
-  public override void tear_down ()
-    {
-      this.tp_backend.remove_account (this._account_handle);
-      this.tp_backend.tear_down ();
+      this._changes_pending = new HashSet<string> ();
     }
 
   public void test_individual_properties ()
@@ -328,7 +317,7 @@ public class IndividualPropertiesTests : Folks.TestCase
               /* set the alias through Telepathy and wait for it to hit our
                * alias notification callback above */
               var handle = (Handle) ((Tpf.Persona) persona).contact.handle;
-              var conn = this.tp_backend.get_connection_for_handle (this._account_handle);
+              var conn = this.tp_backend.get_connection_for_handle (this.account_handle);
               conn.change_aliases ({handle}, {new_alias});
             }
 
diff --git a/tests/telepathy/individual-retrieval.vala b/tests/telepathy/individual-retrieval.vala
index a8b6642..fabddfb 100644
--- a/tests/telepathy/individual-retrieval.vala
+++ b/tests/telepathy/individual-retrieval.vala
@@ -24,10 +24,8 @@ using Tpf;
 using Folks;
 using Gee;
 
-public class IndividualRetrievalTests : Folks.TestCase
+public class IndividualRetrievalTests : TpfTest.TestCase
 {
-  private TpTests.Backend tp_backend;
-  private void* _account_handle;
   private HashSet<string> default_individuals;
   private int _test_timeout = 3;
 
@@ -35,8 +33,6 @@ public class IndividualRetrievalTests : Folks.TestCase
     {
       base ("IndividualRetrieval");
 
-      this.tp_backend = new TpTests.Backend ();
-
       /* IDs of the individuals we expect to see.
        * These are externally opaque, but internally are SHA-1 hashes of the
        * concatenated UIDs of the Personas in the Individual. In these cases,
@@ -72,19 +68,6 @@ public class IndividualRetrievalTests : Folks.TestCase
           this._test_timeout = 10;
     }
 
-  public override void set_up ()
-    {
-      this.tp_backend.set_up ();
-      this._account_handle = this.tp_backend.add_account ("protocol",
-          "me example com", "cm", "account");
-    }
-
-  public override void tear_down ()
-    {
-      this.tp_backend.remove_account (this._account_handle);
-      this.tp_backend.tear_down ();
-    }
-
   public void test_aggregator ()
     {
       var main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/telepathy/init.vala b/tests/telepathy/init.vala
index 55fabce..828c706 100644
--- a/tests/telepathy/init.vala
+++ b/tests/telepathy/init.vala
@@ -20,40 +20,24 @@
 using Gee;
 using Folks;
 
-public class InitTests : Folks.TestCase
+public class InitTests : TpfTest.TestCase
 {
-  private TpTests.Backend _tp_backend;
   private int _test_timeout = 5;
 
   public InitTests ()
     {
       base ("Init");
 
-      this._tp_backend = new TpTests.Backend ();
-
       /* Set up the tests */
       this.add_test ("quiescence", this.test_quiescence);
     }
 
-  public override void set_up ()
-    {
-      this._tp_backend.set_up ();
-    }
-
-  public override void tear_down ()
-    {
-      this._tp_backend.tear_down ();
-    }
-
   /* Prepare an aggregator and wait for quiescence, then quit. Error if reaching
    * quiescence takes too long. */
   public void test_quiescence ()
     {
       var main_loop = new GLib.MainLoop (null, false);
 
-      void* account_handle = this._tp_backend.add_account ("protocol",
-          "me example com", "cm", "account");
-
       /* Main test code. */
       var aggregator = new IndividualAggregator ();
 
@@ -90,9 +74,6 @@ public class InitTests : Folks.TestCase
       /* Check results. */
       assert (aggregator.is_quiescent == true);
       assert (aggregator.individuals.size > 0);
-
-      /* Clean up for the next test */
-      this._tp_backend.remove_account (account_handle);
     }
 }
 
diff --git a/tests/telepathy/persona-store-capabilities.vala b/tests/telepathy/persona-store-capabilities.vala
index 36e1c36..31423da 100644
--- a/tests/telepathy/persona-store-capabilities.vala
+++ b/tests/telepathy/persona-store-capabilities.vala
@@ -24,10 +24,8 @@ using Tpf;
 using Folks;
 using Gee;
 
-public class PersonaStoreCapabilitiesTests : Folks.TestCase
+public class PersonaStoreCapabilitiesTests : TpfTest.TestCase
 {
-  private TpTests.Backend tp_backend;
-  private void* _account_handle;
   private HashSet<string> _capabilities_received;
   private int _test_timeout = 3;
 
@@ -35,8 +33,6 @@ public class PersonaStoreCapabilitiesTests : Folks.TestCase
     {
       base ("PersonaStoreCapabilities");
 
-      this.tp_backend = new TpTests.Backend ();
-
       this.add_test ("persona store capabilities",
           this.test_persona_store_capabilities);
 
@@ -46,17 +42,9 @@ public class PersonaStoreCapabilitiesTests : Folks.TestCase
 
   public override void set_up ()
     {
-      this._capabilities_received = new HashSet<string> ();
-
-      this.tp_backend.set_up ();
-      this._account_handle = this.tp_backend.add_account ("protocol",
-          "me example com", "cm", "account");
-    }
+      base.set_up ();
 
-  public override void tear_down ()
-    {
-      this.tp_backend.remove_account (this._account_handle);
-      this.tp_backend.tear_down ();
+      this._capabilities_received = new HashSet<string> ();
     }
 
   public void test_persona_store_capabilities ()
diff --git a/tests/tracker/add-contact.vala b/tests/tracker/add-contact.vala
index 6ee913f..9890961 100644
--- a/tests/tracker/add-contact.vala
+++ b/tests/tracker/add-contact.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class AddContactTests : Folks.TestCase
+public class AddContactTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private bool _contact_added;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
@@ -35,19 +34,9 @@ public class AddContactTests : Folks.TestCase
     {
       base ("AddContactTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test adding contacts ", this.test_add_contact);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_add_contact ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -56,8 +45,9 @@ public class AddContactTests : Folks.TestCase
 
       Gee.HashMap<string, string> c1 = new Gee.HashMap<string, string> ();
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
-      this._tracker_backend.set_up ();
+      var tracker_backend = (!) this.tracker_backend;
+      tracker_backend.add_contact (c1);
+      tracker_backend.set_up ();
 
       this._test_add_contact_async.begin ();
 
@@ -69,7 +59,6 @@ public class AddContactTests : Folks.TestCase
 
       this._main_loop.run ();
       assert (this._contact_added == true);
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_add_contact_async ()
diff --git a/tests/tracker/add-persona.vala b/tests/tracker/add-persona.vala
index d554902..7d56ed8 100644
--- a/tests/tracker/add-persona.vala
+++ b/tests/tracker/add-persona.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class AddPersonaTests : Folks.TestCase
+public class AddPersonaTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private string _persona_nickname;
@@ -64,19 +63,9 @@ public class AddPersonaTests : Folks.TestCase
     {
       base ("AddPersonaTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test adding personas to Tracker ", this.test_add_persona);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_add_persona ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -143,8 +132,6 @@ public class AddPersonaTests : Folks.TestCase
         {
           assert (k);
         }
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_add_persona_async ()
diff --git a/tests/tracker/additional-names-updates.vala b/tests/tracker/additional-names-updates.vala
index 13fff09..67c2be6 100644
--- a/tests/tracker/additional-names-updates.vala
+++ b/tests/tracker/additional-names-updates.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class AdditionalNamesUpdatesTests : Folks.TestCase
+public class AdditionalNamesUpdatesTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private bool _updated_additional_names_found;
   private string _updated_additional_names;
@@ -40,21 +39,12 @@ public class AdditionalNamesUpdatesTests : Folks.TestCase
     {
       base ("AdditionalNamesUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("additional names updates",
           this.test_additional_names_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_additional_names_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -68,9 +58,9 @@ public class AdditionalNamesUpdatesTests : Folks.TestCase
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname);
       c1.set (Trf.OntologyDefs.NCO_ADDITIONAL,
           this._initial_additional_names);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._initial_additional_names_found = false;
       this._updated_additional_names_found = false;
@@ -89,8 +79,6 @@ public class AdditionalNamesUpdatesTests : Folks.TestCase
 
       assert (this._initial_additional_names_found == true);
       assert (this._updated_additional_names_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_additional_names_updates_async (BackendStore store)
@@ -128,7 +116,7 @@ public class AdditionalNamesUpdatesTests : Folks.TestCase
                     (this._notify_additional_names_cb);
                   this._individual_id = i.id;
                   this._initial_additional_names_found = true;
-                  this._tracker_backend.update_contact (this._contact_urn,
+                  ((!) this.tracker_backend).update_contact (this._contact_urn,
                       Trf.OntologyDefs.NCO_ADDITIONAL,
                       this._updated_additional_names);
                 }
diff --git a/tests/tracker/avatar-details-interface.vala b/tests/tracker/avatar-details-interface.vala
index dfcf389..91b3bf0 100644
--- a/tests/tracker/avatar-details-interface.vala
+++ b/tests/tracker/avatar-details-interface.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class AvatarDetailsInterfaceTests : Folks.TestCase
+public class AvatarDetailsInterfaceTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private string _avatar_uri;
   private bool _avatars_are_equal;
   private GLib.MainLoop _main_loop;
@@ -35,20 +34,10 @@ public class AvatarDetailsInterfaceTests : Folks.TestCase
     {
       base ("AvatarDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test avatar details interface",
           this.test_avatar_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_avatar_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -61,8 +50,8 @@ public class AvatarDetailsInterfaceTests : Folks.TestCase
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, "persona #1");
       c1.set (Trf.OntologyDefs.NCO_PHOTO, this._avatar_uri);
-      this._tracker_backend.add_contact (c1);
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).add_contact (c1);
+      ((!) this.tracker_backend).set_up ();
 
       test_avatar_details_interface_async.begin ();
 
@@ -74,7 +63,6 @@ public class AvatarDetailsInterfaceTests : Folks.TestCase
 
       this._main_loop.run ();
       assert (this._avatars_are_equal);
-      this._tracker_backend.tear_down ();
     }
 
   private async void test_avatar_details_interface_async ()
diff --git a/tests/tracker/avatar-updates.vala b/tests/tracker/avatar-updates.vala
index e4166c9..f5f630b 100644
--- a/tests/tracker/avatar-updates.vala
+++ b/tests/tracker/avatar-updates.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class AvatarUpdatesTests : Folks.TestCase
+public class AvatarUpdatesTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private bool _updated_avatar_found;
   private string _updated_avatar_uri;
@@ -42,20 +41,11 @@ public class AvatarUpdatesTests : Folks.TestCase
     {
       base ("AvatarUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("avatar updates", this.test_avatar_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_avatar_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -71,9 +61,9 @@ public class AvatarUpdatesTests : Folks.TestCase
       c1.set (TrackerTest.Backend.URN, this._contact_urn);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname);
       c1.set (Trf.OntologyDefs.NCO_PHOTO, this._initial_avatar_uri);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._initial_avatar_found = false;
       this._updated_avatar_found = false;
@@ -91,8 +81,6 @@ public class AvatarUpdatesTests : Folks.TestCase
 
       assert (this._initial_avatar_found == true);
       assert (this._updated_avatar_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void test_avatar_updates_async ()
@@ -134,17 +122,17 @@ public class AvatarUpdatesTests : Folks.TestCase
                 {
                   this._initial_avatar_found = true;
 
-                  this._tracker_backend.remove_triplet (this._contact_urn,
+                  ((!) this.tracker_backend).remove_triplet (this._contact_urn,
                       Trf.OntologyDefs.NCO_PHOTO, this._photo_urn);
 
                   string photo_urn_2 = "<" + this._updated_avatar_uri;
                   photo_urn_2 += ">";
-                  this._tracker_backend.insert_triplet (photo_urn_2,
+                  ((!) this.tracker_backend).insert_triplet (photo_urn_2,
                       "a", "nfo:Image, nie:DataObject",
                       Trf.OntologyDefs.NIE_URL,
                       this._updated_avatar_uri);
 
-                  this._tracker_backend.insert_triplet
+                  ((!) this.tracker_backend).insert_triplet
                       (this._contact_urn,
                       Trf.OntologyDefs.NCO_PHOTO, photo_urn_2);
 
diff --git a/tests/tracker/birthday-details-interface.vala b/tests/tracker/birthday-details-interface.vala
index d57243f..2d8513d 100644
--- a/tests/tracker/birthday-details-interface.vala
+++ b/tests/tracker/birthday-details-interface.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class BirthdayDetailsInterfaceTests : Folks.TestCase
+public class BirthdayDetailsInterfaceTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private bool _found_birthday;
   private DateTime _dobj;
   private GLib.MainLoop _main_loop;
@@ -36,21 +35,12 @@ public class BirthdayDetailsInterfaceTests : Folks.TestCase
     {
       base ("BirthdayDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("test birthday details interface",
           this.test_birthay_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_birthay_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -63,8 +53,8 @@ public class BirthdayDetailsInterfaceTests : Folks.TestCase
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._fullname);
       c1.set (Trf.OntologyDefs.NCO_BIRTHDAY, birthday);
-      this._tracker_backend.add_contact (c1);
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).add_contact (c1);
+      ((!) this.tracker_backend).set_up ();
 
       this._found_birthday = false;
 
@@ -79,8 +69,6 @@ public class BirthdayDetailsInterfaceTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._found_birthday == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_birthay_details_interface ()
diff --git a/tests/tracker/birthday-updates.vala b/tests/tracker/birthday-updates.vala
index a5a59fd..0dc2584 100644
--- a/tests/tracker/birthday-updates.vala
+++ b/tests/tracker/birthday-updates.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class BirthdayUpdatesTests : Folks.TestCase
+public class BirthdayUpdatesTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _initial_birthday;
   private string _updated_birthday;
@@ -42,20 +41,11 @@ public class BirthdayUpdatesTests : Folks.TestCase
     {
       base ("BirthdayUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("birthday updates", this.test_birthday_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_birthday_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -76,9 +66,9 @@ public class BirthdayUpdatesTests : Folks.TestCase
       c1.set (TrackerTest.Backend.URN, this._contact_urn);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname);
       c1.set (Trf.OntologyDefs.NCO_BIRTHDAY, this._initial_birthday);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._initial_birthday_found = false;
       this._updated_birthday_found = false;
@@ -97,8 +87,6 @@ public class BirthdayUpdatesTests : Folks.TestCase
 
       assert (this._initial_birthday_found == true);
       assert (this._updated_birthday_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void test_birthday_updates_async ()
@@ -137,7 +125,7 @@ public class BirthdayUpdatesTests : Folks.TestCase
                 {
                   this._individual_id = i.id;
                   this._initial_birthday_found = true;
-                  this._tracker_backend.update_contact (this._contact_urn,
+                  ((!) this.tracker_backend).update_contact (this._contact_urn,
                       Trf.OntologyDefs.NCO_BIRTHDAY, this._updated_birthday);
                 }
             }
@@ -164,7 +152,7 @@ public class BirthdayUpdatesTests : Folks.TestCase
         {
           this._individual_id = i.id;
           this._initial_birthday_found = true;
-          this._tracker_backend.update_contact (this._contact_urn,
+          ((!) this.tracker_backend).update_contact (this._contact_urn,
               Trf.OntologyDefs.NCO_BIRTHDAY, this._updated_birthday);
         }
       else if (i.birthday.compare (this._updated_bday_obj) == 0)
diff --git a/tests/tracker/default-contact.vala b/tests/tracker/default-contact.vala
index 2c256ea..b2de4a3 100644
--- a/tests/tracker/default-contact.vala
+++ b/tests/tracker/default-contact.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class DefaultContactTests : Folks.TestCase
+public class DefaultContactTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private bool _found_default_user;
   private bool _found_not_user;
   private bool _found_unknown_user;
@@ -36,19 +35,9 @@ public class DefaultContactTests : Folks.TestCase
     {
       base ("DefaultContactTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test default contact", this.test_default_contact);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_default_contact ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -56,9 +45,9 @@ public class DefaultContactTests : Folks.TestCase
       this._fullname_persona = "persona #1";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._fullname_persona);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._found_default_user = false;
       this._found_not_user = false;
@@ -77,8 +66,6 @@ public class DefaultContactTests : Folks.TestCase
       assert (this._found_default_user == true);
       assert (this._found_not_user == true);
       assert (this._found_unknown_user == false);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_default_contact_async ()
diff --git a/tests/tracker/duplicated-emails.vala b/tests/tracker/duplicated-emails.vala
index e3c7326..dcc48de 100644
--- a/tests/tracker/duplicated-emails.vala
+++ b/tests/tracker/duplicated-emails.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class DuplicatedEmailsTests : Folks.TestCase
+public class DuplicatedEmailsTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname_1 = "persona #1";
   private string _persona_fullname_2 = "persona #2";
@@ -40,21 +39,10 @@ public class DuplicatedEmailsTests : Folks.TestCase
     {
       base ("DuplicatedEmailsTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test adding 2 personas with the same email address ",
           this.test_duplicated_emails);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-      this._tracker_backend.tear_down ();
-    }
-
   public void test_duplicated_emails ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/tracker/duplicated-phones.vala b/tests/tracker/duplicated-phones.vala
index c0f8c97..40e4626 100644
--- a/tests/tracker/duplicated-phones.vala
+++ b/tests/tracker/duplicated-phones.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class DuplicatedPhonesTests : Folks.TestCase
+public class DuplicatedPhonesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname_1 = "persona #1";
   private string _persona_fullname_2 = "persona #2";
@@ -40,21 +39,10 @@ public class DuplicatedPhonesTests : Folks.TestCase
     {
       base ("DuplicatedPhonesTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test adding 2 personas with the same phone number ",
           this.test_duplicated_phones);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-      this._tracker_backend.tear_down ();
-    }
-
   public void test_duplicated_phones ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/tracker/email-details-interface.vala b/tests/tracker/email-details-interface.vala
index c49af09..0fde3f2 100644
--- a/tests/tracker/email-details-interface.vala
+++ b/tests/tracker/email-details-interface.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class EmailDetailsInterfaceTests : Folks.TestCase
+public class EmailDetailsInterfaceTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
   private int _num_emails;
@@ -36,20 +35,10 @@ public class EmailDetailsInterfaceTests : Folks.TestCase
     {
       base ("EmailDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test email details interface",
           this.test_email_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_email_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -58,9 +47,9 @@ public class EmailDetailsInterfaceTests : Folks.TestCase
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, "persona #1");
       c1.set (Trf.OntologyDefs.NCO_EMAIL_PROP,
           "test1 example org,test2 example org");
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._num_emails = 0;
       this._found_email_1 = false;
@@ -79,8 +68,6 @@ public class EmailDetailsInterfaceTests : Folks.TestCase
       assert (this._num_emails == 2);
       assert (this._found_email_1 == true);
       assert (this._found_email_2 == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_email_details_interface_async ()
diff --git a/tests/tracker/emails-updates.vala b/tests/tracker/emails-updates.vala
index 5c180d0..a3dc253 100644
--- a/tests/tracker/emails-updates.vala
+++ b/tests/tracker/emails-updates.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class EmailsUpdatesTests : Folks.TestCase
+public class EmailsUpdatesTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private string _individual_id;
@@ -40,20 +39,11 @@ public class EmailsUpdatesTests : Folks.TestCase
     {
       base ("EmailsUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("emails updates", this.test_emails_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_emails_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -66,9 +56,9 @@ public class EmailsUpdatesTests : Folks.TestCase
       c1.set (TrackerTest.Backend.URN, this._contact_urn_1);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname_1);
       c1.set (Trf.OntologyDefs.NCO_EMAIL_PROP, this._email_1);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._individual_id = "";
       this._initial_email_found = false;
@@ -103,8 +93,6 @@ public class EmailsUpdatesTests : Folks.TestCase
 
       assert (initial_email_found_again == false);
       assert (this._updated_email_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_emails_updates_async ()
@@ -147,25 +135,26 @@ public class EmailsUpdatesTests : Folks.TestCase
                       this._initial_email_found = true;
 
                       var urn_email_1 = "<" + this._email_1 + ">";
-                      this._tracker_backend.remove_triplet (this._contact_urn_1,
+                      ((!) this.tracker_backend).remove_triplet (
+                          this._contact_urn_1,
                           Trf.OntologyDefs.NCO_HAS_AFFILIATION, urn_email_1);
 
                       var urn_email_2 = "<email:" + this._email_2 + ">";
-                      this._tracker_backend.insert_triplet (urn_email_2,
+                      ((!) this.tracker_backend).insert_triplet (urn_email_2,
                           "a", Trf.OntologyDefs.NCO_EMAIL,
                           Trf.OntologyDefs.NCO_EMAIL_PROP,
                           this._email_2);
 
                       var affl_2 = "<" + this._email_2 + ">";
-                      this._tracker_backend.insert_triplet
+                      ((!) this.tracker_backend).insert_triplet
                           (affl_2,
                           "a", Trf.OntologyDefs.NCO_AFFILIATION);
 
-                      this._tracker_backend.insert_triplet
+                      ((!) this.tracker_backend).insert_triplet
                           (affl_2,
                           Trf.OntologyDefs.NCO_HAS_EMAIL, urn_email_2);
 
-                      this._tracker_backend.insert_triplet
+                      ((!) this.tracker_backend).insert_triplet
                           (this._contact_urn_1,
                           Trf.OntologyDefs.NCO_HAS_AFFILIATION, affl_2);
                     }
diff --git a/tests/tracker/family-name-updates.vala b/tests/tracker/family-name-updates.vala
index 163193c..e22f5f6 100644
--- a/tests/tracker/family-name-updates.vala
+++ b/tests/tracker/family-name-updates.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class FamilyNameUpdatesTests : Folks.TestCase
+public class FamilyNameUpdatesTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private bool _initial_family_name_found;
@@ -41,20 +40,11 @@ public class FamilyNameUpdatesTests : Folks.TestCase
     {
       base ("FamilyNameUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("family name updates", this.test_family_name_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_family_name_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -67,9 +57,9 @@ public class FamilyNameUpdatesTests : Folks.TestCase
       c1.set (TrackerTest.Backend.URN, this._contact_urn);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname);
       c1.set (Trf.OntologyDefs.NCO_FAMILY, this._initial_family_name);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._initial_family_name_found = false;
       this._updated_family_name_found = false;
@@ -87,8 +77,6 @@ public class FamilyNameUpdatesTests : Folks.TestCase
 
       assert (this._initial_family_name_found == true);
       assert (this._updated_family_name_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_family_name_updates_async ()
@@ -127,7 +115,7 @@ public class FamilyNameUpdatesTests : Folks.TestCase
                 {
                   this._individual_id = i.id;
                   this._initial_family_name_found = true;
-                  this._tracker_backend.update_contact (this._contact_urn,
+                  ((!) this.tracker_backend).update_contact (this._contact_urn,
                       Trf.OntologyDefs.NCO_FAMILY, this._updated_family_name);
                 }
             }
diff --git a/tests/tracker/favourite-details-interface.vala b/tests/tracker/favourite-details-interface.vala
index 69df537..eff49fe 100644
--- a/tests/tracker/favourite-details-interface.vala
+++ b/tests/tracker/favourite-details-interface.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class FavouriteDetailsInterfaceTests : Folks.TestCase
+public class FavouriteDetailsInterfaceTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private GLib.MainLoop _main_loop;
   private string _fullname_p1;
   private string _fullname_p2;
@@ -39,20 +38,10 @@ public class FavouriteDetailsInterfaceTests : Folks.TestCase
     {
       base ("FavouriteDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test favourite details interface",
           this.test_favourite_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_favourite_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -65,16 +54,16 @@ public class FavouriteDetailsInterfaceTests : Folks.TestCase
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._fullname_p1);
       c1.set (Trf.OntologyDefs.NAO_TAG, "");
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
       c2.set (Trf.OntologyDefs.NCO_FULLNAME, this._fullname_p2);
       c2.set (Trf.OntologyDefs.NAO_TAG, "");
-      this._tracker_backend.add_contact (c2);
+      ((!) this.tracker_backend).add_contact (c2);
 
       c3.set (Trf.OntologyDefs.NCO_FULLNAME, this._fullname_p3);
-      this._tracker_backend.add_contact (c3);
+      ((!) this.tracker_backend).add_contact (c3);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._found_p1 = false;
       this._found_p2 = false;
@@ -93,8 +82,6 @@ public class FavouriteDetailsInterfaceTests : Folks.TestCase
       assert (this._found_p1 == true);
       assert (this._found_p2 == true);
       assert (this._found_p3 == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_favourite_details_interface_async ()
diff --git a/tests/tracker/favourite-updates.vala b/tests/tracker/favourite-updates.vala
index cbfca04..8174358 100644
--- a/tests/tracker/favourite-updates.vala
+++ b/tests/tracker/favourite-updates.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class FavouriteUpdatesTests : Folks.TestCase
+public class FavouriteUpdatesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private bool _is_favourite_1;
   private string _individual_id_1;
@@ -41,20 +40,11 @@ public class FavouriteUpdatesTests : Folks.TestCase
     {
       base ("FavouriteUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("favourite update", this.test_favourite_update);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_favourite_update ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -67,14 +57,14 @@ public class FavouriteUpdatesTests : Folks.TestCase
 
       c1.set (TrackerTest.Backend.URN, this._contact_urn_1);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname_1);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
       c2.set (TrackerTest.Backend.URN, this._contact_urn_2);
       c2.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname_2);
       c2.set (Trf.OntologyDefs.NAO_TAG, "");
-      this._tracker_backend.add_contact (c2);
+      ((!) this.tracker_backend).add_contact (c2);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._is_favourite_1 = false;
       this._individual_id_1 = "";
@@ -95,8 +85,6 @@ public class FavouriteUpdatesTests : Folks.TestCase
 
       assert (this._is_favourite_1 == true);
       assert (this._is_favourite_2 == false);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_favourite_update_async ()
@@ -131,7 +119,7 @@ public class FavouriteUpdatesTests : Folks.TestCase
               i.notify["is-favourite"].connect
                   (this._notify_favourite_cb);
               this._individual_id_1 = i.id;
-              this._tracker_backend.update_favourite (this._contact_urn_1,
+              ((!) this.tracker_backend).update_favourite (this._contact_urn_1,
                   true);
             }
           else if (i.full_name == this._initial_fullname_2)
@@ -142,7 +130,7 @@ public class FavouriteUpdatesTests : Folks.TestCase
               // HACK: we need to make sure the INSERT event was delivered
               Timeout.add_seconds (1, () =>
                   {
-                    this._tracker_backend.update_favourite
+                    ((!) this.tracker_backend).update_favourite
                         (this._contact_urn_2, false);
                     return false;
                   });
diff --git a/tests/tracker/fullname-updates.vala b/tests/tracker/fullname-updates.vala
index a62306e..863b947 100644
--- a/tests/tracker/fullname-updates.vala
+++ b/tests/tracker/fullname-updates.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class FullnameUpdatesTests : Folks.TestCase
+public class FullnameUpdatesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private bool _updated_name_found;
   private bool _deleted_name_found;
@@ -40,20 +39,11 @@ public class FullnameUpdatesTests : Folks.TestCase
     {
       base ("FullnameUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("fullname updates", this.test_fullname_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_fullname_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -64,9 +54,9 @@ public class FullnameUpdatesTests : Folks.TestCase
 
       c1.set (TrackerTest.Backend.URN, this._contact_urn);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._initial_name_found = false;
       this._updated_name_found = false;
@@ -85,8 +75,6 @@ public class FullnameUpdatesTests : Folks.TestCase
 
       assert (this._initial_name_found == true);
       assert (this._updated_name_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_fullname_updates_async ()
@@ -121,7 +109,7 @@ public class FullnameUpdatesTests : Folks.TestCase
               i.notify["full-name"].connect (this._notify_full_name_cb);
               this._individual_id = i.id;
               this._initial_name_found = true;
-              this._tracker_backend.update_contact (this._contact_urn,
+              ((!) this.tracker_backend).update_contact (this._contact_urn,
                   Trf.OntologyDefs.NCO_FULLNAME, this._updated_fullname);
             }
         }
diff --git a/tests/tracker/gender-details-interface.vala b/tests/tracker/gender-details-interface.vala
index 22078ce..ae499be 100644
--- a/tests/tracker/gender-details-interface.vala
+++ b/tests/tracker/gender-details-interface.vala
@@ -23,11 +23,10 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class GenderDetailsInterfaceTests : Folks.TestCase
+public class GenderDetailsInterfaceTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
-  private TrackerTest.Backend _tracker_backend;
   private bool _found_gender;
   private string _gender;
   private string _fullname;
@@ -36,21 +35,12 @@ public class GenderDetailsInterfaceTests : Folks.TestCase
     {
       base ("GenderDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("test gender details interface",
           this.test_gender_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_gender_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -60,8 +50,8 @@ public class GenderDetailsInterfaceTests : Folks.TestCase
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._fullname);
       c1.set (Trf.OntologyDefs.NCO_GENDER, this._gender);
-      this._tracker_backend.add_contact (c1);
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).add_contact (c1);
+      ((!) this.tracker_backend).set_up ();
 
       this._found_gender = false;
 
@@ -76,8 +66,6 @@ public class GenderDetailsInterfaceTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._found_gender == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_gender_details_interface_async ()
diff --git a/tests/tracker/given-name-updates.vala b/tests/tracker/given-name-updates.vala
index bb1088f..57358c8 100644
--- a/tests/tracker/given-name-updates.vala
+++ b/tests/tracker/given-name-updates.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class GivenNameUpdatesTests : Folks.TestCase
+public class GivenNameUpdatesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private bool _updated_given_name_found;
   private string _updated_given_name;
@@ -40,20 +39,11 @@ public class GivenNameUpdatesTests : Folks.TestCase
     {
       base ("GivenNameUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("given name updates", this.test_given_name_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_given_name_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -66,9 +56,9 @@ public class GivenNameUpdatesTests : Folks.TestCase
       c1.set (TrackerTest.Backend.URN, this._contact_urn);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname);
       c1.set (Trf.OntologyDefs.NCO_GIVEN, this._initial_given_name);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._initial_given_name_found = false;
       this._updated_given_name_found = false;
@@ -86,8 +76,6 @@ public class GivenNameUpdatesTests : Folks.TestCase
 
       assert (this._initial_given_name_found == true);
       assert (this._updated_given_name_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_given_name_updates_async ()
@@ -126,7 +114,7 @@ public class GivenNameUpdatesTests : Folks.TestCase
                 {
                   this._individual_id = i.id;
                   this._initial_given_name_found = true;
-                  this._tracker_backend.update_contact (this._contact_urn,
+                  ((!) this.tracker_backend).update_contact (this._contact_urn,
                       Trf.OntologyDefs.NCO_GIVEN, this._updated_given_name);
                 }
             }
diff --git a/tests/tracker/im-details-interface.vala b/tests/tracker/im-details-interface.vala
index 9128922..f947d12 100644
--- a/tests/tracker/im-details-interface.vala
+++ b/tests/tracker/im-details-interface.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class ImDetailsInterfaceTests : Folks.TestCase
+public class ImDetailsInterfaceTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private int _num_addrs;
   private bool _found_addr_1;
@@ -37,20 +36,10 @@ public class ImDetailsInterfaceTests : Folks.TestCase
     {
       base ("ImDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test im details interface",
           this.test_im_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_im_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -60,9 +49,9 @@ public class ImDetailsInterfaceTests : Folks.TestCase
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._fullname);
       c1.set (Trf.OntologyDefs.NCO_IMADDRESS,
           "jabber#test1 example org,aim#test2 example org");
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._num_addrs = 0;
       this._found_addr_1 = false;
@@ -81,8 +70,6 @@ public class ImDetailsInterfaceTests : Folks.TestCase
       assert (this._num_addrs == 2);
       assert (this._found_addr_1 == true);
       assert (this._found_addr_2 == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_im_details_interface_async ()
diff --git a/tests/tracker/imaddresses-updates.vala b/tests/tracker/imaddresses-updates.vala
index 820d32f..89ce3f5 100644
--- a/tests/tracker/imaddresses-updates.vala
+++ b/tests/tracker/imaddresses-updates.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class IMAddressesUpdatesTests : Folks.TestCase
+public class IMAddressesUpdatesTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private string _initial_fullname_1;
@@ -42,20 +41,11 @@ public class IMAddressesUpdatesTests : Folks.TestCase
     {
       base ("IMAddressesUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("im addresses updates", this.test_imaddresses_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_imaddresses_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -70,8 +60,8 @@ public class IMAddressesUpdatesTests : Folks.TestCase
       c1.set (TrackerTest.Backend.URN, this._contact_urn_1);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname_1);
       c1.set (Trf.OntologyDefs.NCO_IMADDRESS, this._imaddress_proto_1);
-      this._tracker_backend.add_contact (c1);
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).add_contact (c1);
+      ((!) this.tracker_backend).set_up ();
 
       this._individual_id = "";
       this._initial_imaddress_found = false;
@@ -89,8 +79,6 @@ public class IMAddressesUpdatesTests : Folks.TestCase
 
       assert (this._initial_imaddress_found == true);
       assert (this._updated_imaddr_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_imaddresses_updates_async ()
@@ -174,11 +162,11 @@ public class IMAddressesUpdatesTests : Folks.TestCase
   private void _do_im_addr_update ()
     {
       var urn_affil_1 = "<" + this._imaddress_1 + "myaffiliation>";
-      this._tracker_backend.remove_triplet (this._contact_urn_1,
+      ((!) this.tracker_backend).remove_triplet (this._contact_urn_1,
           Trf.OntologyDefs.NCO_HAS_AFFILIATION, urn_affil_1);
 
       var urn_imaddr_2 = "<" + this._imaddress_2 + ">";
-      this._tracker_backend.insert_triplet
+      ((!) this.tracker_backend).insert_triplet
           (urn_imaddr_2,
            "a", Trf.OntologyDefs.NCO_IMADDRESS,
            Trf.OntologyDefs.NCO_IMPROTOCOL, this._proto_2,
@@ -186,15 +174,15 @@ public class IMAddressesUpdatesTests : Folks.TestCase
 
       var urn_affil_2 = "<" + this._imaddress_2;
       urn_affil_2 += "myaffiliation>";
-      this._tracker_backend.insert_triplet
+      ((!) this.tracker_backend).insert_triplet
           (urn_affil_2,
           "a", Trf.OntologyDefs.NCO_AFFILIATION);
 
-     this._tracker_backend.insert_triplet
+     ((!) this.tracker_backend).insert_triplet
          (urn_affil_2,
          Trf.OntologyDefs.NCO_HAS_IMADDRESS, urn_imaddr_2);
 
-     this._tracker_backend.insert_triplet
+     ((!) this.tracker_backend).insert_triplet
          (this._contact_urn_1,
           Trf.OntologyDefs.NCO_HAS_AFFILIATION, urn_affil_2);
     }
diff --git a/tests/tracker/individual-retrieval.vala b/tests/tracker/individual-retrieval.vala
index eadfca2..854870e 100644
--- a/tests/tracker/individual-retrieval.vala
+++ b/tests/tracker/individual-retrieval.vala
@@ -23,11 +23,10 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class IndividualRetrievalTests : Folks.TestCase
+public class IndividualRetrievalTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
-  private TrackerTest.Backend _tracker_backend;
   private Gee.HashMap<string, string> _c1;
   private Gee.HashMap<string, string> _c2;
 
@@ -35,19 +34,9 @@ public class IndividualRetrievalTests : Folks.TestCase
     {
       base ("IndividualRetrieval");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("singleton individuals", this.test_singleton_individuals);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_singleton_individuals ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -55,10 +44,10 @@ public class IndividualRetrievalTests : Folks.TestCase
       this._c2 = new Gee.HashMap<string, string> ();
 
       this._c1.set (Trf.OntologyDefs.NCO_FULLNAME, "persona #1");
-      this._tracker_backend.add_contact (this._c1);
+      ((!) this.tracker_backend).add_contact (this._c1);
       this._c2.set (Trf.OntologyDefs.NCO_FULLNAME, "persona #2");
-      this._tracker_backend.add_contact (this._c2);
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).add_contact (this._c2);
+      ((!) this.tracker_backend).set_up ();
 
       this._test_singleton_individuals_async.begin ();
 
@@ -72,8 +61,6 @@ public class IndividualRetrievalTests : Folks.TestCase
 
       assert (this._c1.size == 0);
       assert (this._c2.size == 0);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_singleton_individuals_async ()
diff --git a/tests/tracker/link-personas-via-local-ids.vala b/tests/tracker/link-personas-via-local-ids.vala
index 75b1ef0..8fdec67 100644
--- a/tests/tracker/link-personas-via-local-ids.vala
+++ b/tests/tracker/link-personas-via-local-ids.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class LinkPersonasViaLocalIDsTests : Folks.TestCase
+public class LinkPersonasViaLocalIDsTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname_1;
   private string _persona_fullname_2;
@@ -43,28 +42,27 @@ public class LinkPersonasViaLocalIDsTests : Folks.TestCase
     {
       base ("LinkPersonasViaLocalIDsTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test linking personas",
           this.test_linking_personas_via_local_ids);
     }
 
   public override void set_up ()
     {
+      base.set_up ();
+
       Environment.set_variable ("FOLKS_PRIMARY_STORE", "tracker", true);
 
       /* FIXME: this set_up method takes care both of setting
        * the connection with Tracker and adding the contacts
        * needed for the tests. We might need to trigger those
        * actions at separate points so we should decouple them. */
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
     }
 
   public override void tear_down ()
     {
-      this._tracker_backend.tear_down ();
-
       Environment.unset_variable ("FOLKS_PRIMARY_STORE");
+      base.tear_down ();
     }
 
   public void test_linking_personas_via_local_ids ()
diff --git a/tests/tracker/link-personas.vala b/tests/tracker/link-personas.vala
index d8f85d3..90ebd0f 100644
--- a/tests/tracker/link-personas.vala
+++ b/tests/tracker/link-personas.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class LinkPersonasTests : Folks.TestCase
+public class LinkPersonasTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname_1;
   private string _persona_fullname_2;
@@ -45,26 +44,26 @@ public class LinkPersonasTests : Folks.TestCase
     {
       base ("LinkPersonasTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test linking personas", this.test_linking_personas);
     }
 
   public override void set_up ()
     {
+      base.set_up ();
+
       Environment.set_variable ("FOLKS_PRIMARY_STORE", "tracker", true);
 
       /* FIXME: this set_up method takes care both of setting
        * the connection with Tracker and adding the contacts
        * needed for the tests. We might need to trigger those
        * actions at separate points so we should decouple them. */
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
     }
 
   public override void tear_down ()
     {
-      this._tracker_backend.tear_down ();
       Environment.unset_variable ("FOLKS_PRIMARY_STORE");
+      base.tear_down ();
     }
 
   public void test_linking_personas ()
diff --git a/tests/tracker/match-all.vala b/tests/tracker/match-all.vala
index e14ce45..c0f4d26 100644
--- a/tests/tracker/match-all.vala
+++ b/tests/tracker/match-all.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class MatchAllTests : Folks.TestCase
+public class MatchAllTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator = null;
   private string _persona_fullname_1 = "Bernie Innocenti";
   private string _persona_fullname_2 = "Bernardo H. Innocenti";
@@ -45,21 +44,10 @@ public class MatchAllTests : Folks.TestCase
     {
       base ("MatchAllTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test potential match all ",
           this.test_match_all);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-      this._tracker_backend.tear_down ();
-    }
-
   public void test_match_all ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/tracker/match-email-addresses.vala b/tests/tracker/match-email-addresses.vala
index a04b959..73b007c 100644
--- a/tests/tracker/match-email-addresses.vala
+++ b/tests/tracker/match-email-addresses.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class MatchEmailAddressesTests : Folks.TestCase
+public class MatchEmailAddressesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname_1 = "aaa";
   private string _persona_fullname_2 = "bbb";
@@ -41,21 +40,10 @@ public class MatchEmailAddressesTests : Folks.TestCase
     {
       base ("MatchEmailAddressesTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test potential match with same email addresses ",
           this.test_match_email_addresses);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-      this._tracker_backend.tear_down ();
-    }
-
   public void test_match_email_addresses ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/tracker/match-im-addresses.vala b/tests/tracker/match-im-addresses.vala
index f5f2b52..7329c5e 100644
--- a/tests/tracker/match-im-addresses.vala
+++ b/tests/tracker/match-im-addresses.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class MatchIMAddressesTests : Folks.TestCase
+public class MatchIMAddressesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname_1 = "aaa";
   private string _persona_fullname_2 = "bbb";
@@ -42,21 +41,10 @@ public class MatchIMAddressesTests : Folks.TestCase
     {
       base ("MatchIMAddressesTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test potential match by IM addresses ",
           this.test_match_im_addresses);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-      this._tracker_backend.tear_down ();
-    }
-
   public void test_match_im_addresses ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/tracker/match-known-emails.vala b/tests/tracker/match-known-emails.vala
index 3b89c1a..3515108 100644
--- a/tests/tracker/match-known-emails.vala
+++ b/tests/tracker/match-known-emails.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class MatchKnownEmailsTests : Folks.TestCase
+public class MatchKnownEmailsTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
 
   /* Make sure the names are completely different so
@@ -45,21 +44,10 @@ public class MatchKnownEmailsTests : Folks.TestCase
     {
       base ("MatchKnownEmailsTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test potential match with same email addresses ",
           this.test_match_email_addresses);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-      this._tracker_backend.tear_down ();
-    }
-
   public void test_match_email_addresses ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/tracker/match-name.vala b/tests/tracker/match-name.vala
index 328844b..198dd4b 100644
--- a/tests/tracker/match-name.vala
+++ b/tests/tracker/match-name.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class MatchNameTests : Folks.TestCase
+public class MatchNameTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator = null;
   private string _persona_fullname_1 = "Bernie Innocenti";
   private string _persona_fullname_2 = "Bernardo H. Innocenti";
@@ -40,8 +39,6 @@ public class MatchNameTests : Folks.TestCase
     {
       base ("MatchNameTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test potential match by name #1 ",
           this.test_match_name_1);
       this.add_test ("test potential match by name #2 ",
@@ -56,15 +53,6 @@ public class MatchNameTests : Folks.TestCase
           this.test_match_name_6);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-      this._tracker_backend.tear_down ();
-    }
-
   private void _test_match_name (string full_name1, string full_name2)
     {
       this._main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/tracker/match-phone-number.vala b/tests/tracker/match-phone-number.vala
index 198b0f3..0819aec 100644
--- a/tests/tracker/match-phone-number.vala
+++ b/tests/tracker/match-phone-number.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class MatchPhoneNumberTests : Folks.TestCase
+public class MatchPhoneNumberTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname_1 = "aaa";
   private string _persona_fullname_2 = "bbb";
@@ -42,21 +41,10 @@ public class MatchPhoneNumberTests : Folks.TestCase
     {
       base ("MatchPhoneNumberTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test potential match with phone numbers ",
           this.test_match_phone_number);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-      this._tracker_backend.tear_down ();
-    }
-
   public void test_match_phone_number ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/tracker/name-details-interface.vala b/tests/tracker/name-details-interface.vala
index 7850d7b..93836ce 100644
--- a/tests/tracker/name-details-interface.vala
+++ b/tests/tracker/name-details-interface.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class NameDetailsInterfaceTests : Folks.TestCase
+public class NameDetailsInterfaceTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private GLib.MainLoop _main_loop;
   private Gee.HashMap<string, string> _c1;
@@ -35,20 +34,10 @@ public class NameDetailsInterfaceTests : Folks.TestCase
     {
       base ("NameDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test name details interface",
           this.test_name_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_name_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -61,12 +50,12 @@ public class NameDetailsInterfaceTests : Folks.TestCase
       this._c1.set (Trf.OntologyDefs.NCO_ADDITIONAL, "p #1 Additional");
       this._c1.set (Trf.OntologyDefs.NCO_PREFIX, "Mr");
       this._c1.set (Trf.OntologyDefs.NCO_SUFFIX, "Jr");
-      this._tracker_backend.add_contact (this._c1);
+      ((!) this.tracker_backend).add_contact (this._c1);
 
       this._c2.set (Trf.OntologyDefs.NCO_FULLNAME, "persona #2");
-      this._tracker_backend.add_contact (this._c2);
+      ((!) this.tracker_backend).add_contact (this._c2);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._test_name_details_interface_async.begin ();
 
@@ -80,8 +69,6 @@ public class NameDetailsInterfaceTests : Folks.TestCase
 
       assert (this._c1.size == 0);
       assert (this._c2.size == 0);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_name_details_interface_async ()
diff --git a/tests/tracker/nickname-updates.vala b/tests/tracker/nickname-updates.vala
index 9bf5dce..db99b2d 100644
--- a/tests/tracker/nickname-updates.vala
+++ b/tests/tracker/nickname-updates.vala
@@ -23,9 +23,8 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class NicknameUpdatesTests : Folks.TestCase
+public class NicknameUpdatesTests : TrackerTest.TestCase
 {
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private bool _updated_nickname_found;
   private string _updated_nickname;
@@ -38,20 +37,11 @@ public class NicknameUpdatesTests : Folks.TestCase
     {
       base ("NicknameUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("nickname updates", this.test_nickname_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_nickname_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -62,9 +52,9 @@ public class NicknameUpdatesTests : Folks.TestCase
 
       c1.set (TrackerTest.Backend.URN, this._contact_urn);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._updated_nickname_found = false;
       this._individual_id = "";
@@ -80,8 +70,6 @@ public class NicknameUpdatesTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._updated_nickname_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_nickname_updates_async ()
@@ -117,18 +105,18 @@ public class NicknameUpdatesTests : Folks.TestCase
               this._individual_id = i.id;
 
               var im_addr = "<urn:im-address>";
-              this._tracker_backend.insert_triplet (im_addr,
+              ((!) this.tracker_backend).insert_triplet (im_addr,
                   "a", Trf.OntologyDefs.NCO_IMADDRESS,
                   Trf.OntologyDefs.NCO_IM_NICKNAME, this._updated_nickname);
 
               var affl = "<urn:im-affl>";
-              this._tracker_backend.insert_triplet (affl,
+              ((!) this.tracker_backend).insert_triplet (affl,
                   "a", Trf.OntologyDefs.NCO_AFFILIATION);
 
-               this._tracker_backend.insert_triplet (affl,
+               ((!) this.tracker_backend).insert_triplet (affl,
                  Trf.OntologyDefs.NCO_HAS_IMADDRESS, im_addr);
 
-              this._tracker_backend.insert_triplet (this._contact_urn,
+              ((!) this.tracker_backend).insert_triplet (this._contact_urn,
                   Trf.OntologyDefs.NCO_HAS_AFFILIATION, affl);
             }
         }
diff --git a/tests/tracker/note-details-interface.vala b/tests/tracker/note-details-interface.vala
index 9031ff4..6531f5d 100644
--- a/tests/tracker/note-details-interface.vala
+++ b/tests/tracker/note-details-interface.vala
@@ -23,11 +23,10 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class NoteDetailsInterfaceTests : Folks.TestCase
+public class NoteDetailsInterfaceTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
-  private TrackerTest.Backend _tracker_backend;
   private bool _found_note;
   private string _note;
   private string _fullname = "persona #1";
@@ -36,21 +35,12 @@ public class NoteDetailsInterfaceTests : Folks.TestCase
     {
       base ("NoteDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("test note details interface",
           this.test_note_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_note_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -60,9 +50,9 @@ public class NoteDetailsInterfaceTests : Folks.TestCase
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._fullname);
       c1.set (Trf.OntologyDefs.NCO_NOTE, this._note);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._found_note = false;
 
@@ -77,8 +67,6 @@ public class NoteDetailsInterfaceTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._found_note == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_note_details_interface_async ()
diff --git a/tests/tracker/phone-details-interface.vala b/tests/tracker/phone-details-interface.vala
index 9f4e913..240a09e 100644
--- a/tests/tracker/phone-details-interface.vala
+++ b/tests/tracker/phone-details-interface.vala
@@ -23,11 +23,10 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class PhoneDetailsInterfaceTests : Folks.TestCase
+public class PhoneDetailsInterfaceTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
-  private TrackerTest.Backend _tracker_backend;
   private int _num_phones = 0;
   private bool _found_phone_1 = false;
   private bool _found_phone_2 = false;
@@ -36,20 +35,10 @@ public class PhoneDetailsInterfaceTests : Folks.TestCase
     {
       base ("PhoneDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test phone details interface",
           this.test_phone_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_phone_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -57,9 +46,9 @@ public class PhoneDetailsInterfaceTests : Folks.TestCase
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, "persona #1");
       c1.set (Trf.OntologyDefs.NCO_PHONE_PROP, "12345,54321");
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._num_phones = 0;
       this._found_phone_1 = false;
@@ -78,8 +67,6 @@ public class PhoneDetailsInterfaceTests : Folks.TestCase
       assert (this._num_phones == 2);
       assert (this._found_phone_1 == true);
       assert (this._found_phone_2 == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_phone_details_interface_async ()
diff --git a/tests/tracker/phones-updates.vala b/tests/tracker/phones-updates.vala
index 54f498c..30c287a 100644
--- a/tests/tracker/phones-updates.vala
+++ b/tests/tracker/phones-updates.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class PhonesUpdatesTests : Folks.TestCase
+public class PhonesUpdatesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _initial_fullname_1;
   private string _contact_urn_1;
@@ -41,20 +40,11 @@ public class PhonesUpdatesTests : Folks.TestCase
     {
       base ("PhonesUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("phones updates", this.test_phones_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_phones_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -67,9 +57,9 @@ public class PhonesUpdatesTests : Folks.TestCase
       c1.set (TrackerTest.Backend.URN, this._contact_urn_1);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname_1);
       c1.set (Trf.OntologyDefs.NCO_PHONE_PROP, this._phone_1);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._individual_id = "";
       this._initial_phone_found = false;
@@ -89,8 +79,6 @@ public class PhonesUpdatesTests : Folks.TestCase
       assert (this._initial_phone_found == true);
       assert (this._initial_phone_found_again == false);
       assert (this._updated_phone_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_phones_updates_async ()
@@ -167,24 +155,24 @@ public class PhonesUpdatesTests : Folks.TestCase
   private void _update_phone ()
     {
       var urn_phone_1 = "<" + this._phone_1 + ">";
-      this._tracker_backend.remove_triplet (this._contact_urn_1,
+      ((!) this.tracker_backend).remove_triplet (this._contact_urn_1,
           Trf.OntologyDefs.NCO_HAS_AFFILIATION, urn_phone_1);
 
       var urn_phone_2 = "<phone:" + this._phone_2 + ">";
-      this._tracker_backend.insert_triplet (urn_phone_2,
+      ((!) this.tracker_backend).insert_triplet (urn_phone_2,
           "a", Trf.OntologyDefs.NCO_PHONE,
           Trf.OntologyDefs.NCO_PHONE_PROP,
           this._phone_2);
 
       var affl_2 = "<" + this._phone_2 + ">";
-      this._tracker_backend.insert_triplet
+      ((!) this.tracker_backend).insert_triplet
           (affl_2,
           "a", Trf.OntologyDefs.NCO_AFFILIATION);
-      this._tracker_backend.insert_triplet
+      ((!) this.tracker_backend).insert_triplet
           (affl_2,
           Trf.OntologyDefs.NCO_HAS_PHONE, urn_phone_2);
 
-      this._tracker_backend.insert_triplet
+      ((!) this.tracker_backend).insert_triplet
           (this._contact_urn_1,
           Trf.OntologyDefs.NCO_HAS_AFFILIATION, affl_2);
     }
diff --git a/tests/tracker/postal-address-details-interface.vala 
b/tests/tracker/postal-address-details-interface.vala
index 11cb13f..c6a72c7 100644
--- a/tests/tracker/postal-address-details-interface.vala
+++ b/tests/tracker/postal-address-details-interface.vala
@@ -23,11 +23,10 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class PostalAddressDetailsInterfaceTests : Folks.TestCase
+public class PostalAddressDetailsInterfaceTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
-  private TrackerTest.Backend _tracker_backend;
   private string _pobox = "12345";
   private string _district = "example district";
   private string _county = "example country";
@@ -46,20 +45,10 @@ public class PostalAddressDetailsInterfaceTests : Folks.TestCase
     {
       base ("PostalAddressDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test postal address details interface",
           this.test_postal_address_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_postal_address_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -93,8 +82,8 @@ public class PostalAddressDetailsInterfaceTests : Folks.TestCase
       postal_info += this._region;
 
       c1.set (Trf.OntologyDefs.NCO_POSTAL_ADDRESS, postal_info);
-      this._tracker_backend.add_contact (c1);
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).add_contact (c1);
+      ((!) this.tracker_backend).set_up ();
 
       this._found_postal_address = false;
 
@@ -109,8 +98,6 @@ public class PostalAddressDetailsInterfaceTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._found_postal_address == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_postal_address_details_interface_async ()
diff --git a/tests/tracker/prefix-name-updates.vala b/tests/tracker/prefix-name-updates.vala
index 621bf4a..af424f1 100644
--- a/tests/tracker/prefix-name-updates.vala
+++ b/tests/tracker/prefix-name-updates.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class PrefixNameUpdatesTests : Folks.TestCase
+public class PrefixNameUpdatesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private bool _updated_prefix_name_found;
   private bool _initial_prefix_name_found;
@@ -40,20 +39,11 @@ public class PrefixNameUpdatesTests : Folks.TestCase
     {
       base ("PrefixNameUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("prefix name updates", this.test_prefix_name_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_prefix_name_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -66,9 +56,9 @@ public class PrefixNameUpdatesTests : Folks.TestCase
       c1.set (TrackerTest.Backend.URN, this._contact_urn);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname);
       c1.set (Trf.OntologyDefs.NCO_PREFIX, this._initial_prefix_name);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._initial_prefix_name_found = false;
       this._updated_prefix_name_found = false;
@@ -86,8 +76,6 @@ public class PrefixNameUpdatesTests : Folks.TestCase
 
       assert (this._initial_prefix_name_found == true);
       assert (this._updated_prefix_name_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_prefix_name_updates_async ()
@@ -126,7 +114,7 @@ public class PrefixNameUpdatesTests : Folks.TestCase
                   (this._notify_prefix_name_cb);
                   this._individual_id = i.id;
                   this._initial_prefix_name_found = true;
-                  this._tracker_backend.update_contact (this._contact_urn,
+                  ((!) this.tracker_backend).update_contact (this._contact_urn,
                       Trf.OntologyDefs.NCO_PREFIX, this._updated_prefix_name);
                 }
             }
diff --git a/tests/tracker/remove-contact.vala b/tests/tracker/remove-contact.vala
index 1547e28..b30d589 100644
--- a/tests/tracker/remove-contact.vala
+++ b/tests/tracker/remove-contact.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class RemoveContactTests : Folks.TestCase
+public class RemoveContactTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private bool _contact_added;
   private bool _contact_removed;
@@ -37,19 +36,9 @@ public class RemoveContactTests : Folks.TestCase
     {
       base ("RemoveContactTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test removing contacts ", this.test_remove_contact);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_remove_contact ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -57,8 +46,8 @@ public class RemoveContactTests : Folks.TestCase
       Gee.HashMap<string, string> c1 = new Gee.HashMap<string, string> ();
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).add_contact (c1);
+      ((!) this.tracker_backend).set_up ();
 
       this._contact_added = false;
       this._contact_removed = false;
@@ -76,8 +65,6 @@ public class RemoveContactTests : Folks.TestCase
 
       assert (this._contact_added == true);
       assert (this._contact_removed == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_remove_contact_async ()
@@ -118,7 +105,7 @@ public class RemoveContactTests : Folks.TestCase
               foreach (var persona in i.personas)
                 {
                   var contact_id = persona.iid.split (":")[1];
-                  this._tracker_backend.remove_contact (contact_id);
+                  ((!) this.tracker_backend).remove_contact (contact_id);
                 }
             }
         }
diff --git a/tests/tracker/remove-persona.vala b/tests/tracker/remove-persona.vala
index fd85e57..e7a9613 100644
--- a/tests/tracker/remove-persona.vala
+++ b/tests/tracker/remove-persona.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class RemovePersonaTests : Folks.TestCase
+public class RemovePersonaTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private bool _persona_removed;
@@ -41,19 +40,9 @@ public class RemovePersonaTests : Folks.TestCase
     {
       base ("RemovePersonaTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test adding personas to Tracker ", this.test_remove_persona);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_remove_persona ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -74,8 +63,6 @@ public class RemovePersonaTests : Folks.TestCase
 
       assert (this._persona_removed == true);
       assert (this._individual_removed == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_remove_persona_async ()
diff --git a/tests/tracker/role-details-interface.vala b/tests/tracker/role-details-interface.vala
index 1b78ae6..be0768c 100644
--- a/tests/tracker/role-details-interface.vala
+++ b/tests/tracker/role-details-interface.vala
@@ -23,11 +23,10 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class RoleDetailsInterfaceTests : Folks.TestCase
+public class RoleDetailsInterfaceTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
-  private TrackerTest.Backend _tracker_backend;
   private bool _found_role;
   private string _fullname;
   private string _affiliaton;
@@ -36,21 +35,12 @@ public class RoleDetailsInterfaceTests : Folks.TestCase
     {
       base ("RoleDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("test role details interface",
           this.test_role_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_role_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -60,9 +50,9 @@ public class RoleDetailsInterfaceTests : Folks.TestCase
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._fullname);
       c1.set (Trf.OntologyDefs.NCO_HAS_AFFILIATION, this._affiliaton);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._found_role = false;
 
@@ -77,8 +67,6 @@ public class RoleDetailsInterfaceTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._found_role == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_role_details_interface_async ()
diff --git a/tests/tracker/set-avatar.vala b/tests/tracker/set-avatar.vala
index 2ffb6d0..331a662 100644
--- a/tests/tracker/set-avatar.vala
+++ b/tests/tracker/set-avatar.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetAvatarTests : Folks.TestCase
+public class SetAvatarTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private LoadableIcon _avatar;
@@ -36,19 +35,9 @@ public class SetAvatarTests : Folks.TestCase
     {
       base ("SetAvatarTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting avatar ", this.test_set_avatar);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_avatar ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -58,9 +47,9 @@ public class SetAvatarTests : Folks.TestCase
       this._avatar = new FileIcon (File.new_for_path (_avatar_path));
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._avatar_found = false;
 
@@ -75,8 +64,6 @@ public class SetAvatarTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._avatar_found);
-
-     this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_avatar_async ()
diff --git a/tests/tracker/set-birthday.vala b/tests/tracker/set-birthday.vala
index 86e1d50..8187497 100644
--- a/tests/tracker/set-birthday.vala
+++ b/tests/tracker/set-birthday.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetBirthdayTests : Folks.TestCase
+public class SetBirthdayTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private bool _bday_found;
@@ -37,20 +36,10 @@ public class SetBirthdayTests : Folks.TestCase
     {
       base ("SetBirthdayTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting bithday ",
           this.test_set_bday);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_bday ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -58,14 +47,14 @@ public class SetBirthdayTests : Folks.TestCase
       this._persona_fullname = "persona #1";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
       this._birthday = "2001-10-26T20:32:52Z";
       TimeVal t = TimeVal ();
       t.from_iso8601 (this._birthday);
       this._bday = new  DateTime.from_timeval_utc (t);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._bday_found = false;
 
@@ -80,8 +69,6 @@ public class SetBirthdayTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._bday_found);
-
-     this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_bday_async ()
diff --git a/tests/tracker/set-duplicate-email.vala b/tests/tracker/set-duplicate-email.vala
index 0953be7..e15fc5b 100644
--- a/tests/tracker/set-duplicate-email.vala
+++ b/tests/tracker/set-duplicate-email.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetDuplicateEmailTests : Folks.TestCase
+public class SetDuplicateEmailTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname_1 = "persona #1";
   private string _email_1 = "some-address example org";
@@ -38,21 +37,10 @@ public class SetDuplicateEmailTests : Folks.TestCase
     {
       base ("SetDuplicateEmailTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test re-setting an existing e-mail address",
           this.test_set_duplicate_email);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-      this._tracker_backend.tear_down ();
-    }
-
   public void test_set_duplicate_email ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/tracker/set-emails.vala b/tests/tracker/set-emails.vala
index 50dadd3..66aa067 100644
--- a/tests/tracker/set-emails.vala
+++ b/tests/tracker/set-emails.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetEmailsTests : Folks.TestCase
+public class SetEmailsTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private string _email_1;
@@ -38,19 +37,9 @@ public class SetEmailsTests : Folks.TestCase
     {
       base ("SetEmailsTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting emails ", this.test_set_emails);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_emails ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -60,9 +49,9 @@ public class SetEmailsTests : Folks.TestCase
       this._email_2 = "email-2 example org";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._email_1_found = false;
       this._email_2_found = false;
@@ -79,8 +68,6 @@ public class SetEmailsTests : Folks.TestCase
 
       assert (this._email_1_found);
       assert (this._email_2_found);
-
-     this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_emails_async ()
diff --git a/tests/tracker/set-favourite.vala b/tests/tracker/set-favourite.vala
index 3111c80..6a228bf 100644
--- a/tests/tracker/set-favourite.vala
+++ b/tests/tracker/set-favourite.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetFavouriteTests : Folks.TestCase
+public class SetFavouriteTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _initial_fullname_1 = "persona #1";
   private string _initial_fullname_2 = "persona #2";
@@ -39,19 +38,9 @@ public class SetFavouriteTests : Folks.TestCase
     {
       base ("SetFavouriteTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting favourite ", this.test_set_alias);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_alias ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -61,13 +50,13 @@ public class SetFavouriteTests : Folks.TestCase
       this._initial_fullname_2 = "persona #2";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname_1);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
       c2.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname_2);
       c2.set (Trf.OntologyDefs.NAO_TAG, "");
-      this._tracker_backend.add_contact (c2);
+      ((!) this.tracker_backend).add_contact (c2);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._c1_initially_not_favourite = false;
       this._c1_finally_favourite = false;
@@ -93,8 +82,6 @@ public class SetFavouriteTests : Folks.TestCase
       assert (this._c1_finally_favourite);
       assert (this._c2_initially_favourite);
       assert (this._c2_finally_not_favourite);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_alias_async ()
diff --git a/tests/tracker/set-full-name.vala b/tests/tracker/set-full-name.vala
index db4df96..07cdba1 100644
--- a/tests/tracker/set-full-name.vala
+++ b/tests/tracker/set-full-name.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetFullNameTests : Folks.TestCase
+public class SetFullNameTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private bool _found_changed_full_name ;
@@ -37,20 +36,10 @@ public class SetFullNameTests : Folks.TestCase
     {
       base ("SetFullNameTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting structured name ",
           this.test_set_full_name);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_full_name ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -60,9 +49,9 @@ public class SetFullNameTests : Folks.TestCase
       this._modified_fullname = "modified - persona #1";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._found_changed_full_name = false;
 
@@ -77,8 +66,6 @@ public class SetFullNameTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._found_changed_full_name);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_full_name_async ()
diff --git a/tests/tracker/set-gender.vala b/tests/tracker/set-gender.vala
index e0ac543..5e473bf 100644
--- a/tests/tracker/set-gender.vala
+++ b/tests/tracker/set-gender.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetGenderTests : Folks.TestCase
+public class SetGenderTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private bool _gender_found;
@@ -35,20 +34,10 @@ public class SetGenderTests : Folks.TestCase
     {
       base ("SetGenderTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting gender ",
           this.test_set_gender);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_gender ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -56,9 +45,9 @@ public class SetGenderTests : Folks.TestCase
       this._persona_fullname = "persona #1";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._gender_found = false;
 
@@ -73,8 +62,6 @@ public class SetGenderTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._gender_found);
-
-     this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_gender_async ()
diff --git a/tests/tracker/set-im-addresses.vala b/tests/tracker/set-im-addresses.vala
index 80f6d3d..3b72ec1 100644
--- a/tests/tracker/set-im-addresses.vala
+++ b/tests/tracker/set-im-addresses.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetIMAddressesTests : Folks.TestCase
+public class SetIMAddressesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private GLib.List<string> _addresses =
@@ -37,19 +36,9 @@ public class SetIMAddressesTests : Folks.TestCase
     {
       base ("SetIMAddressesTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting im_addresses ", this.test_set_im_addresses);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_im_addresses ()
     {
       this._initial_individual_found = false;
@@ -59,14 +48,14 @@ public class SetIMAddressesTests : Folks.TestCase
       this._persona_fullname = "persona #1";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
       this._addresses.prepend ("one example org");
       this._addresses.prepend ("two example org");
       this._addresses.prepend ("three example org");
       this._addresses.prepend ("four example org");
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._test_set_im_addresses_async.begin ();
 
@@ -80,8 +69,6 @@ public class SetIMAddressesTests : Folks.TestCase
 
       assert (this._initial_individual_found);
       assert (this._addresses.length () == 0);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_im_addresses_async ()
diff --git a/tests/tracker/set-nickname.vala b/tests/tracker/set-nickname.vala
index 0118204..0d64b7e 100644
--- a/tests/tracker/set-nickname.vala
+++ b/tests/tracker/set-nickname.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetNicknameTests : Folks.TestCase
+public class SetNicknameTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private string _initial_nickname;
@@ -38,19 +37,9 @@ public class SetNicknameTests : Folks.TestCase
     {
       base ("SetNicknameTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting nickname ", this.test_set_nickname);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_nickname ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -61,9 +50,9 @@ public class SetNicknameTests : Folks.TestCase
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
       c1.set (Trf.OntologyDefs.NCO_NICKNAME, this._initial_nickname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._initial_nickname_found = false;
       this._modified_nickname_found = false;
@@ -80,8 +69,6 @@ public class SetNicknameTests : Folks.TestCase
 
       assert (this._initial_nickname_found == true);
       assert (this._modified_nickname_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_nickname_async ()
diff --git a/tests/tracker/set-notes.vala b/tests/tracker/set-notes.vala
index 6da3ab9..1b59506 100644
--- a/tests/tracker/set-notes.vala
+++ b/tests/tracker/set-notes.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetNotesTests : Folks.TestCase
+public class SetNotesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private bool _note_found;
@@ -36,20 +35,10 @@ public class SetNotesTests : Folks.TestCase
     {
       base ("SetNotesTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting notes ",
           this.test_set_notes);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_notes ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -57,11 +46,11 @@ public class SetNotesTests : Folks.TestCase
       this._persona_fullname = "persona #1";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
       this._note = new NoteFieldDetails ("some note");
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._note_found = false;
 
@@ -76,8 +65,6 @@ public class SetNotesTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._note_found);
-
-     this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_notes_async ()
diff --git a/tests/tracker/set-null-avatar.vala b/tests/tracker/set-null-avatar.vala
index ec67491..432e7ac 100644
--- a/tests/tracker/set-null-avatar.vala
+++ b/tests/tracker/set-null-avatar.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetNullAvatarTests : Folks.TestCase
+public class SetNullAvatarTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private bool _null_avatar_set;
@@ -35,19 +34,9 @@ public class SetNullAvatarTests : Folks.TestCase
     {
       base ("SetNullAvatarTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting null avatar ", this.test_set_null_avatar);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_null_avatar ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -55,9 +44,9 @@ public class SetNullAvatarTests : Folks.TestCase
       this._persona_fullname = "persona #1";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._null_avatar_set = false;
 
@@ -72,8 +61,6 @@ public class SetNullAvatarTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._null_avatar_set);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_null_avatar_async ()
diff --git a/tests/tracker/set-phones.vala b/tests/tracker/set-phones.vala
index 79dccf6..c70f0e8 100644
--- a/tests/tracker/set-phones.vala
+++ b/tests/tracker/set-phones.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetPhonesTests : Folks.TestCase
+public class SetPhonesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private string _phone_1;
@@ -38,19 +37,9 @@ public class SetPhonesTests : Folks.TestCase
     {
       base ("SetPhonesTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting phones ", this.test_set_phones);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_phones ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -60,9 +49,9 @@ public class SetPhonesTests : Folks.TestCase
       this._phone_2 = "54321";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._phone_1_found = false;
       this._phone_2_found = false;
@@ -79,8 +68,6 @@ public class SetPhonesTests : Folks.TestCase
 
       assert (this._phone_1_found);
       assert (this._phone_2_found);
-
-     this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_phones_async ()
diff --git a/tests/tracker/set-postal-addresses.vala b/tests/tracker/set-postal-addresses.vala
index 94b8659..f741a42 100644
--- a/tests/tracker/set-postal-addresses.vala
+++ b/tests/tracker/set-postal-addresses.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetPostalAddressesTests : Folks.TestCase
+public class SetPostalAddressesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private bool _postal_address_found;
@@ -36,20 +35,10 @@ public class SetPostalAddressesTests : Folks.TestCase
     {
       base ("SetPostalAddressesTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting postal addresses ",
           this.test_set_postal_addresses);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_postal_addresses ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -57,7 +46,7 @@ public class SetPostalAddressesTests : Folks.TestCase
       this._persona_fullname = "persona #1";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
       var pa = new PostalAddress (null, null, null, null, null,
           null, null, null, null);
@@ -70,7 +59,7 @@ public class SetPostalAddressesTests : Folks.TestCase
       pa.region = "some region";
       this._postal_address_fd = new PostalAddressFieldDetails (pa);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._postal_address_found = false;
 
@@ -85,8 +74,6 @@ public class SetPostalAddressesTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._postal_address_found);
-
-     this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_postal_addresses_async ()
diff --git a/tests/tracker/set-roles.vala b/tests/tracker/set-roles.vala
index a9535e1..6f691a3 100644
--- a/tests/tracker/set-roles.vala
+++ b/tests/tracker/set-roles.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetRolesTests : Folks.TestCase
+public class SetRolesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private bool _role_found;
@@ -36,20 +35,10 @@ public class SetRolesTests : Folks.TestCase
     {
       base ("SetRolesTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting roles ",
           this.test_set_roles);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_roles ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -57,13 +46,13 @@ public class SetRolesTests : Folks.TestCase
       this._persona_fullname = "persona #1";
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
       var role = new Role ("some title", "some organisation");
       role.role = "some role";
       this._role_fd = new RoleFieldDetails (role);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._role_found = false;
 
@@ -78,8 +67,6 @@ public class SetRolesTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._role_found);
-
-     this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_roles_async ()
diff --git a/tests/tracker/set-structured-name.vala b/tests/tracker/set-structured-name.vala
index 57e8a0a..67e3349 100644
--- a/tests/tracker/set-structured-name.vala
+++ b/tests/tracker/set-structured-name.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetStructuredNameTests : Folks.TestCase
+public class SetStructuredNameTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   private bool _sname_found;
@@ -41,20 +40,10 @@ public class SetStructuredNameTests : Folks.TestCase
     {
       base ("SetStructuredNameTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting structured name ",
           this.test_set_structured_name);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_structured_name ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -70,9 +59,9 @@ public class SetStructuredNameTests : Folks.TestCase
           this._additional_names, this._prefixes, this._suffixes);
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._sname_found = false;
 
@@ -87,8 +76,6 @@ public class SetStructuredNameTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._sname_found);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_structured_name_async ()
diff --git a/tests/tracker/set-urls.vala b/tests/tracker/set-urls.vala
index 09a2eb8..39accea 100644
--- a/tests/tracker/set-urls.vala
+++ b/tests/tracker/set-urls.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SetURLsTests : Folks.TestCase
+public class SetURLsTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private string _persona_fullname;
   Gee.HashMap<string, string> _urls;
@@ -35,19 +34,9 @@ public class SetURLsTests : Folks.TestCase
     {
       base ("SetURLsTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-
       this.add_test ("test setting urls ", this.test_set_urls);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_set_urls ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -62,9 +51,9 @@ public class SetURLsTests : Folks.TestCase
           "http://three.example.org";);
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._persona_fullname);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._test_set_urls_async.begin ();
 
@@ -77,8 +66,6 @@ public class SetURLsTests : Folks.TestCase
       this._main_loop.run ();
 
       assert (this._urls.size == 0);
-
-     this._tracker_backend.tear_down ();
     }
 
   private async void _test_set_urls_async ()
diff --git a/tests/tracker/suffix-name-updates.vala b/tests/tracker/suffix-name-updates.vala
index 5e866bf..caa52d3 100644
--- a/tests/tracker/suffix-name-updates.vala
+++ b/tests/tracker/suffix-name-updates.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class SuffixNameUpdatesTests : Folks.TestCase
+public class SuffixNameUpdatesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private bool _updated_suffix_name_found;
   private bool _deleted_suffix_name_found;
@@ -41,20 +40,11 @@ public class SuffixNameUpdatesTests : Folks.TestCase
     {
       base ("SuffixNameUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("suffix name updates", this.test_suffix_name_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_suffix_name_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -67,9 +57,9 @@ public class SuffixNameUpdatesTests : Folks.TestCase
       c1.set (TrackerTest.Backend.URN, this._contact_urn);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname);
       c1.set (Trf.OntologyDefs.NCO_SUFFIX, this._initial_suffix_name);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._initial_suffix_name_found = false;
       this._updated_suffix_name_found = false;
@@ -88,8 +78,6 @@ public class SuffixNameUpdatesTests : Folks.TestCase
 
       assert (this._initial_suffix_name_found == true);
       assert (this._updated_suffix_name_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_suffix_name_updates_async ()
@@ -128,7 +116,7 @@ public class SuffixNameUpdatesTests : Folks.TestCase
                       (this._notify_suffix_name_cb);
                   this._individual_id = i.id;
                   this._initial_suffix_name_found = true;
-                  this._tracker_backend.update_contact (this._contact_urn,
+                  ((!) this.tracker_backend).update_contact (this._contact_urn,
                       Trf.OntologyDefs.NCO_SUFFIX, this._updated_suffix_name);
                 }
             }
diff --git a/tests/tracker/url-details-interface.vala b/tests/tracker/url-details-interface.vala
index 85ee00a..1487694 100644
--- a/tests/tracker/url-details-interface.vala
+++ b/tests/tracker/url-details-interface.vala
@@ -23,11 +23,10 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class UrlDetailsInterfaceTests : Folks.TestCase
+public class UrlDetailsInterfaceTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
   private IndividualAggregator _aggregator;
-  private TrackerTest.Backend _tracker_backend;
   private string _blog_url;
   private string _website_url;
   private string _urls;
@@ -38,21 +37,12 @@ public class UrlDetailsInterfaceTests : Folks.TestCase
     {
       base ("UrlDetailsInterfaceTests");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("test url details interface",
           this.test_url_details_interface);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_url_details_interface ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -63,9 +53,9 @@ public class UrlDetailsInterfaceTests : Folks.TestCase
 
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, "persona #1");
       c1.set (TrackerTest.Backend.URLS, this._urls);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._found_blog = false;
       this._found_website = false;
@@ -82,8 +72,6 @@ public class UrlDetailsInterfaceTests : Folks.TestCase
 
       assert (this._found_blog == true);
       assert (this._found_website == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_url_details_interface_async ()
diff --git a/tests/tracker/website-updates.vala b/tests/tracker/website-updates.vala
index 6323d60..485a908 100644
--- a/tests/tracker/website-updates.vala
+++ b/tests/tracker/website-updates.vala
@@ -23,10 +23,9 @@ using TrackerTest;
 using Folks;
 using Gee;
 
-public class WebsiteUpdatesTests : Folks.TestCase
+public class WebsiteUpdatesTests : TrackerTest.TestCase
 {
   private GLib.MainLoop _main_loop;
-  private TrackerTest.Backend _tracker_backend;
   private IndividualAggregator _aggregator;
   private bool _updated_website_found;
   private bool _deleted_website_found;
@@ -41,20 +40,11 @@ public class WebsiteUpdatesTests : Folks.TestCase
     {
       base ("WebsiteUpdates");
 
-      this._tracker_backend = new TrackerTest.Backend ();
-      this._tracker_backend.debug = false;
+      ((!) this.tracker_backend).debug = false;
 
       this.add_test ("websites updates", this.test_website_updates);
     }
 
-  public override void set_up ()
-    {
-    }
-
-  public override void tear_down ()
-    {
-    }
-
   public void test_website_updates ()
     {
       this._main_loop = new GLib.MainLoop (null, false);
@@ -67,9 +57,9 @@ public class WebsiteUpdatesTests : Folks.TestCase
       c1.set (TrackerTest.Backend.URN, this._contact_urn);
       c1.set (Trf.OntologyDefs.NCO_FULLNAME, this._initial_fullname);
       c1.set (TrackerTest.Backend.URLS, this._initial_website);
-      this._tracker_backend.add_contact (c1);
+      ((!) this.tracker_backend).add_contact (c1);
 
-      this._tracker_backend.set_up ();
+      ((!) this.tracker_backend).set_up ();
 
       this._initial_website_found = false;
       this._updated_website_found = false;
@@ -88,8 +78,6 @@ public class WebsiteUpdatesTests : Folks.TestCase
 
       assert (this._initial_website_found == true);
       assert (this._updated_website_found == true);
-
-      this._tracker_backend.tear_down ();
     }
 
   private async void _test_website_updates_async ()
@@ -133,10 +121,11 @@ public class WebsiteUpdatesTests : Folks.TestCase
                     {
                       this._initial_website_found = true;
                       string affl = "<affl:website>";
-                      this._tracker_backend.insert_triplet (affl,
+                      ((!) this.tracker_backend).insert_triplet (affl,
                           "a", Trf.OntologyDefs.NCO_AFFILIATION,
                           Trf.OntologyDefs.NCO_WEBSITE, this._updated_website);
-                      this._tracker_backend.insert_triplet (this._contact_urn,
+                      ((!) this.tracker_backend).insert_triplet (
+                          this._contact_urn,
                           Trf.OntologyDefs.NCO_HAS_AFFILIATION,
                           affl);
                     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]