@@ -0,0 +1,663 @@
+package com.versionone.git.storage;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport org.hibernate.Criteria;%0Aimport org.hibernate.criterion.Restrictions;%0Aimport org.junit.Test;%0A%0Apublic class DbStorageTester %7B%0A%0A%09@Test%0A%09public void shouldNotHoldResultsFromGetLastCommit() %7B%0A%09%09IDbStorage storage = new DbStorage();%0A%09%09String repositoryId = %22testRepositoryId%22;%0A%09%09String branchRef = %22testBranchRef%22;%0A%09%09storage.getLastCommit(repositoryId, branchRef);%0A%09%09String commitHash = %221010101010%22;%0A%09%09try %7B%0A%09%09%09storage.persistLastCommit(commitHash , repositoryId, branchRef);%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09fail(%22Storage session is still holding a reference to the last commit.%22);%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

implement test for GitHub Issue #6