diff --git a/tests/unit/index.cpp b/tests/unit/index.cpp
index 1367403..a7ea5e4 100644
--- a/tests/unit/index.cpp
+++ b/tests/unit/index.cpp
@@ -37,48 +37,52 @@
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(IndexGeneralTest, T, DatasetFixtures_Storage, Fixture<T>)
 {
-  Index index(65535);
-  for (typename T::IdContainer::iterator i = this->insert.begin();
-       i != this->insert.end(); ++i)
-  {
-    BOOST_CHECK_EQUAL(index.insert(*i->second, i->first), true);
-  }
-  BOOST_CHECK_EQUAL(index.size(), 7);
+   Index index(65535);
+   for (typename T::IdContainer::iterator i = this->insert.begin();
+        i != this->insert.end(); ++i)
+   {
+     BOOST_CHECK_EQUAL(index.insert(*i->second, i->first), true);
+   }
+   BOOST_CHECK_EQUAL(index.size(), 7);
 
-  typename T::IdContainer::iterator id = this->ids.begin();
-  for (typename T::InterestContainer::iterator i = this->interests.begin();
-       i != this->interests.end(); ++i)
-  {
-    vector<std::pair<int, ndn::Name> > id_names;
-    BOOST_CHECK_EQUAL(index.find(i->first.getName()).first, id->first);
-    BOOST_CHECK_EQUAL(index.hasData(*i->second), true);
-    ++id;
-  }
+   typename T::IdContainer::iterator id = this->ids.begin();
+   for (typename T::InterestContainer::iterator i = this->interests.begin();
+        i != this->interests.end(); ++i)
+   {
+     vector<std::pair<int, ndn::Name> > id_names;
+     BOOST_CHECK_EQUAL(index.find(i->first.getName()).first, id->first);
+     BOOST_CHECK_EQUAL(index.hasData(*i->second), true);
+     ++id;
+   }
 
-  for (typename T::InterestIdContainer::iterator i = this->interestsSelectors.begin();
-       i != this->interestsSelectors.end(); ++i)
-  {
-    BOOST_CHECK_EQUAL(index.find(i->first).first, i->second);
-    ndn::Name name = index.find(i->first).second;
-    BOOST_CHECK_EQUAL(index.erase(name), true);
-  }
-  BOOST_CHECK_EQUAL(index.size(), 2);
+   for (typename T::InterestIdContainer::iterator i = this->interestsSelectors.begin();
+        i != this->interestsSelectors.end(); ++i)
+   {
+
+     BOOST_CHECK_EQUAL(index.find(i->first).first, i->second);
+     ndn::Name name = index.find(i->first).second;
+     BOOST_CHECK_EQUAL(index.erase(name), true);
+   }
+   BOOST_CHECK_EQUAL(index.size(), 2);
 }
 
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(IndexTestSelector, T, DatasetFixtures_Selector, Fixture<T>)
 {
-  Index index(65535);
-  for (typename T::IdContainer::iterator i = this->insert.begin();
-       i != this->insert.end(); ++i)
-    BOOST_CHECK_EQUAL(index.insert(*i->second, i->first), true);
-  for (typename T::InterestIdContainer::iterator i = this->interestsSelectors.begin();
-       i != this->interestsSelectors.end(); ++i)
-  {
-    BOOST_CHECK_EQUAL(index.find(i->first).first, i->second);
-  }
+   Index index(65535);
+   for (typename T::IdContainer::iterator i = this->insert.begin();
+        i != this->insert.end(); ++i)
+     BOOST_CHECK_EQUAL(index.insert(*i->second, i->first), true);
+   for (typename T::InterestIdContainer::iterator i = this->interestsSelectors.begin();
+        i != this->interestsSelectors.end(); ++i)
+   {
+     BOOST_CHECK_EQUAL(index.find(i->first).first, i->second);
+   }
+
+
 }
 
+
 class FindFixture
 {
 protected:
@@ -104,7 +108,7 @@
     return *m_interest;
   }
 
-  int
+  uint64_t
   find()
   {
     std::pair<int,Name> found = m_index.find(*m_interest);
diff --git a/tests/unit/repo-storage.cpp b/tests/unit/repo-storage.cpp
new file mode 100644
index 0000000..41f9930
--- /dev/null
+++ b/tests/unit/repo-storage.cpp
@@ -0,0 +1,99 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014,  Regents of the University of California.
+ *
+ * This file is part of NDN repo-ng (Next generation of NDN repository).
+ * See AUTHORS.md for complete list of repo-ng authors and contributors.
+ *
+ * repo-ng is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * repo-ng 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * repo-ng, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "storage/repo-storage.hpp"
+#include "storage/sqlite-storage.hpp"
+#include "../dataset-fixtures.hpp"
+#include "../repo-storage-fixture.hpp"
+
+#include <boost/test/unit_test.hpp>
+#include <iostream>
+#include <string.h>
+
+namespace repo {
+namespace tests {
+
+BOOST_AUTO_TEST_SUITE(RepoStorage)
+template<class Dataset>
+class Fixture : public Dataset, public RepoStorageFixture
+{
+};
+
+BOOST_FIXTURE_TEST_CASE_TEMPLATE(NdnNameSkipList, T, DatasetFixtures_Storage, Fixture<T>)
+{
+  //Insert
+  for (typename T::DataContainer::iterator i = this->data.begin();
+       i != this->data.end(); ++i) 
+    {
+      BOOST_CHECK_EQUAL(this->handle->insertData(**i), true);
+    }
+  
+  //Read
+  for (typename T::InterestContainer::iterator i = this->interests.begin();
+       i != this->interests.end(); ++i) 
+  {
+      shared_ptr<ndn::Data> dataTest = this->handle->readData(i->first);
+      BOOST_CHECK_EQUAL(*this->handle->readData(i->first), *i->second);
+     // int rc = memcmp(dataTest->getContent().value(),
+      //                i->second->getContent().value(), sizeof(i->second->getContent().value()));
+      //BOOST_CHECK_EQUAL(rc, 0);
+      BOOST_CHECK_EQUAL(this->handle->deleteData(i->first.getName()), 1);
+    }
+ 
+  //Insert
+  for (typename T::DataContainer::iterator i = this->data.begin();
+       i != this->data.end(); ++i) 
+    {
+      BOOST_CHECK_EQUAL(this->handle->insertData(**i), true);
+    }
+
+  //Erase
+  for (typename T::InterestIdContainer::iterator i = this->interestDeleteCount.begin();
+       i != this->interestDeleteCount.end(); ++i)
+    {
+      BOOST_CHECK_EQUAL(this->handle->deleteData(i->first), i->second);
+    }
+}
+
+BOOST_FIXTURE_TEST_CASE_TEMPLATE(Index, T, DatasetFixtures_Storage, Fixture<T>)
+{
+
+  for (typename T::DataContainer::iterator i = this->data.begin();
+       i != this->data.end(); ++i)
+    {
+      BOOST_CHECK_EQUAL(this->handle->insertData(**i), true);
+    }
+  ndn::Interest interest("/a");
+  ndn::Interest interest1("/a/b/d/1");
+
+  BOOST_CHECK_EQUAL(this->handle->deleteData(interest), 7);
+
+
+  for (typename T::DataContainer::iterator i = this->data.begin();
+       i != this->data.end(); ++i)
+    {
+      BOOST_CHECK_EQUAL(this->handle->insertData(**i), true);
+    }
+  BOOST_CHECK_EQUAL(this->handle->deleteData(interest.getName()), 7);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace repo
diff --git a/tests/unit/skiplist.cpp b/tests/unit/skiplist.cpp
index c5bc0d5..34083d6 100644
--- a/tests/unit/skiplist.cpp
+++ b/tests/unit/skiplist.cpp
@@ -36,7 +36,7 @@
 {
 };
 
-BOOST_FIXTURE_TEST_CASE_TEMPLATE(NdnNameSkipList, T, DatasetFixtures_Index, Fixture<T>)
+BOOST_FIXTURE_TEST_CASE_TEMPLATE(NdnNameSkipList, T, DatasetFixtures, Fixture<T>)
 {
   repo::SkipList<ndn::Name, typename T::DataSetNameCompare> skipList;
   //Insert
@@ -49,7 +49,7 @@
   for (typename T::DataContainer::iterator i = this->data.begin();
        i != this->data.end(); ++i) {
     typename repo::SkipList<ndn::Name, typename T::DataSetNameCompare>::iterator findIterator =
-      skipList.lower_bound((*i)->getName());
+      skipList.find((*i)->getName());
     skipList.erase(findIterator);
   }
 
diff --git a/tests/unit/sqlite-handle.cpp b/tests/unit/sqlite-handle.cpp
index 9dbe801..17a4832 100644
--- a/tests/unit/sqlite-handle.cpp
+++ b/tests/unit/sqlite-handle.cpp
@@ -17,7 +17,7 @@
  * repo-ng, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "storage/sqlite-handle.hpp"
+#include "storage/sqlite-storage.hpp"
 
 #include "../sqlite-fixture.hpp"
 #include "../dataset-fixtures.hpp"
@@ -27,45 +27,47 @@
 namespace repo {
 namespace tests {
 
-BOOST_AUTO_TEST_SUITE(SqliteHandle)
+BOOST_AUTO_TEST_SUITE(SqliteStorage)
 
 template<class Dataset>
 class Fixture : public SqliteFixture, public Dataset
 {
 };
 
-BOOST_FIXTURE_TEST_CASE_TEMPLATE(InsertReadDelete, T, DatasetFixtures, Fixture<T>)
+BOOST_FIXTURE_TEST_CASE_TEMPLATE(InsertReadDelete, T, DatasetFixtures_Sqlite, Fixture<T>)
 {
   BOOST_TEST_MESSAGE(T::getName());
 
   // Insert
-  for (typename T::DataContainer::iterator i = this->data.begin();
-       i != this->data.end(); ++i) {
-    BOOST_CHECK_EQUAL(this->handle->insertData(**i), true);
+  for (typename T::IdContainer::iterator i = this->ids.begin();
+       i != this->ids.end(); ++i) {
+    BOOST_CHECK_EQUAL(this->handle->insert(*i->second), i->first);
   }
 
   BOOST_CHECK_EQUAL(this->handle->size(), this->data.size());
 
   // Read (all items should exist)
-  for (typename T::InterestContainer::iterator i = this->interests.begin();
-       i != this->interests.end(); ++i) {
-    ndn::Data retrievedData;
-    BOOST_REQUIRE_EQUAL(this->handle->readData(i->first, retrievedData), true);
-    BOOST_CHECK_EQUAL(retrievedData, *i->second);
+  for (typename T::IdContainer::iterator i = this->ids.begin();
+       i != this->ids.end(); ++i) {
+    shared_ptr<Data> retrievedData = this->handle->read(i->first);
+    BOOST_CHECK_EQUAL(*retrievedData, *i->second);
   }
 
   // Delete
-  for (typename T::DataContainer::iterator i = this->data.begin();
-       i != this->data.end(); ++i) {
-    BOOST_CHECK_EQUAL(this->handle->deleteData((*i)->getName()), true);
+  for (typename T::IdContainer::iterator i = this->ids.begin();
+       i != this->ids.end(); ++i) {
+      //std::cout<<"remove name = "<<i->second->getName()<<std::endl;
+    BOOST_CHECK_EQUAL(this->handle->erase(i->first), true);
   }
 
+  /*
   // Read (none of the items should exist)
   for (typename T::InterestContainer::iterator i = this->interests.begin();
        i != this->interests.end(); ++i) {
     ndn::Data retrievedData;
     BOOST_REQUIRE_EQUAL(this->handle->readData(i->first, retrievedData), false);
-  }
+  }*/
+
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/unit/tcp-bulk-insert-handle.cpp b/tests/unit/tcp-bulk-insert-handle.cpp
index a7d9137..67a541a 100644
--- a/tests/unit/tcp-bulk-insert-handle.cpp
+++ b/tests/unit/tcp-bulk-insert-handle.cpp
@@ -18,8 +18,8 @@
  */
 
 #include "handles/tcp-bulk-insert-handle.hpp"
-
-#include "../sqlite-fixture.hpp"
+#include "storage/sqlite-storage.hpp"
+#include "../repo-storage-fixture.hpp"
 #include "../dataset-fixtures.hpp"
 
 #include <boost/test/unit_test.hpp>
@@ -74,7 +74,7 @@
 
 template<class Dataset>
 class TcpBulkInsertFixture : public TcpClient,
-                             public SqliteFixture,
+                             public RepoStorageFixture,
                              public Dataset
 {
 public:
@@ -153,7 +153,8 @@
 };
 
 
-BOOST_FIXTURE_TEST_CASE_TEMPLATE(BulkInsertAndRead, T, DatasetFixtures, TcpBulkInsertFixture<T>)
+BOOST_FIXTURE_TEST_CASE_TEMPLATE(BulkInsertAndRead, T, DatasetFixtures_Storage,
+                                 TcpBulkInsertFixture<T>)
 {
   BOOST_TEST_MESSAGE(T::getName());
   // BOOST_CHECK_EQUAL(this->handle->size(), 1);
@@ -167,14 +168,16 @@
   // actually run the test
   this->ioService.run();
 
-  BOOST_CHECK_EQUAL(this->handle->size(), this->data.size());
+//  BOOST_CHECK_EQUAL(this->handle->size(), this->data.size());
 
   // Read (all items should exist)
   for (typename T::InterestContainer::iterator i = this->interests.begin();
        i != this->interests.end(); ++i) {
-    ndn::Data retrievedData;
-    BOOST_REQUIRE_EQUAL(this->handle->readData(i->first, retrievedData), true);
-    BOOST_CHECK_EQUAL(retrievedData, *i->second);
+      BOOST_CHECK_EQUAL(*this->handle->readData(i->first), *i->second);
+   // int rc = memcmp(retrievedData->getContent().value(),
+   //                 i->second->getContent().value(), sizeof(i->second->getContent().value()));
+    //BOOST_CHECK_EQUAL(rc, 0);
+
   }
 }
 
