diff --git a/tests/VersioncontrolGitEvent.test b/tests/VersioncontrolGitEvent.test
index 0c3c44d..75e5fb5 100644
--- a/tests/VersioncontrolGitEvent.test
+++ b/tests/VersioncontrolGitEvent.test
@@ -123,9 +123,11 @@ class VersioncontrolGitEventTests extends VersioncontrolGitTestCase {
 
     $event = $this->versioncontrolCreateEvent('git', $data);
 
-    $commits_loaded = $event->loadCommits();
-    foreach ($commits_loaded as &$commit) {
-      $commit = $commit->revision;
+    $commits_loaded = array();
+    foreach ($event as $ref) {
+      foreach ($ref->commits as $commit) {
+        $commits_loaded[] = $commit->revision;
+      }
     }
 
     $this->assertEqual($commits_raw, array_values($commits_loaded), t("Commits linked to VersioncontrolGitEvent are properly loaded."));
@@ -145,17 +147,27 @@ class VersioncontrolGitEventTests extends VersioncontrolGitTestCase {
 
     $event = $this->versioncontrolCreateEvent('git', $data + array('commits' => serialize(array($commit->revision))));
 
-    $labels = array_values($event->loadLabels());
+    $labels = array_values($event->getLabelChanges());
     $this->assertEqual(count($labels), 2, t("loadLabels method returns the correct amount of VersioncontrolLabel's."));
     $this->assertEqual($labels[0]->label_id, $branch->label_id, t("The first returned VersioncontrolLabel is the same as the one that was inserted first."));
     $this->assertEqual($labels[1]->label_id, $tag->label_id, t("The first returned VersioncontrolLabel is the same as the one that was inserted first."));
 
-    $branches = array_values($event->loadBranches());
-    $this->assertEqual(count($branches), 1, t("loadBranches method returns the correct amount of VersioncontrolLabel's."));
-    $this->assertEqual($branches[0]->label_id, $branch->label_id, t("The first returned VersioncontrolLabel is the right branch."));
+    $branch_refs = array();
+    foreach ($refs as $ref) {
+      if ($ref->reftype == VERSIONCONTROL_LABEL_BRANCH) {
+        $branch_refs[] = $ref;
+      }
+    }
+    $this->assertEqual(count($branch_refs), 1, t("loadBranches method returns the correct amount of VersioncontrolLabel's."));
+    $this->assertEqual($branch_refs[0]->label_id, $branch->label_id, t("The first returned VersioncontrolLabel is the right branch."));
 
-    $tags = array_values($event->loadTags());
-    $this->assertEqual(count($tags), 1, t("loadTags method returns the correct amount of VersioncontrolLabel's."));
-    $this->assertEqual($tags[0]->label_id, $tag->label_id, t("The first returned VersioncontrolLabel is the right tag."));
+    $tag_refs = array();
+    foreach ($refs as $ref) {
+      if ($ref->reftype == VERSIONCONTROL_LABEL_TAG) {
+        $tag_refs[] = $ref;
+      }
+    }
+    $this->assertEqual(count($tag_refs), 1, t("loadTags method returns the correct amount of VersioncontrolLabel's."));
+    $this->assertEqual($tag_refs[0]->label_id, $tag->label_id, t("The first returned VersioncontrolLabel is the right tag."));
   }
-}
\ No newline at end of file
+}
diff --git a/tests/VersioncontrolGitHistorySynchronizerDataIntegrityTests.test b/tests/VersioncontrolGitHistorySynchronizerDataIntegrityTests.test
index 27d13fc..20e7201 100644
--- a/tests/VersioncontrolGitHistorySynchronizerDataIntegrityTests.test
+++ b/tests/VersioncontrolGitHistorySynchronizerDataIntegrityTests.test
@@ -55,6 +55,8 @@ class VersioncontrolGitEventDataIntegrityTests extends VersioncontrolGitTestCase
    * Introduce a new branch and update it.
    */
   public function testUpdateBranch() {
+    $commits = count($this->repo->loadCommits(array(), array(), array('may cache' => FALSE)));
+    debug($commits);
     // Simulate push containing new branch with one commit.
     $data = '0000000000000000000000000000000000000000 4817efad5041c7ce8de84fb1013d859eec5231d6 refs/heads/master'. PHP_EOL;
     $this->versioncontrolSimulatePush($data, array('repository' => $this->repo));
@@ -62,6 +64,9 @@ class VersioncontrolGitEventDataIntegrityTests extends VersioncontrolGitTestCase
     // Simulate push containing update to existing branch and 15 additional commits.
     $data = '4817efad5041c7ce8de84fb1013d859eec5231d6 0f0280aefe4d0c3384cb04a0bbb15c9543f46a69 refs/heads/master'. PHP_EOL;
     $this->versioncontrolSimulatePush($data, array('repository' => $this->repo));
+    $commits = $this->repo->loadCommits(array(), array(), array('may cache' => FALSE));
+    $commits = count($commits);
+    debug($commits);
     
     $branches = $this->repo->loadBranches(array(), array(), array('may cache' => FALSE));
     $branch = reset($branches);
@@ -70,7 +75,9 @@ class VersioncontrolGitEventDataIntegrityTests extends VersioncontrolGitTestCase
     $this->assertTrue((count($branches) == 1), t('The branch inserted by the test is the only branch in the database.'));
     
     $commits = $this->repo->loadCommits(array(), array(), array('may cache' => FALSE));
-    
+    $commits = count($commits);
+    debug($commits);
+
     $this->assertTrue((count($commits) == 16), t('The right amount of commits are in the database.'));
   }
   
@@ -199,4 +206,4 @@ class VersioncontrolGitEventDataIntegrityTests extends VersioncontrolGitTestCase
     $this->assertTrue((count($tags) == 0), t('There are no tags in the database.'));
   }
 
-}
\ No newline at end of file
+}
