private static void PutGetTestAssert(PersistentHashTable hashTable, byte[] key, byte[] value)
 {
     hashTable.Put(key, value);
     byte[] actual = hashTable.Get(key);
     TestHelper.AssertByteArraysAreSame(value, actual);
 }
 private static void RemoveTestAssert(PersistentHashTable hashTable, int valueSize, byte[] key)
 {
     hashTable.Put(key, new byte[valueSize]);
     hashTable.Remove(key);
     try
     {
         hashTable.Get(key);
     }
     catch (KeyNotFoundException){}
 }
        public void ReopenTest()
        {
            string hastTableName = "ReopenHashTableTest";
            PersistentHashTable hashTable = InitTable(hastTableName, 20, 4, 4, 6);
            try
            {
                byte[] key = new byte[] {4, 4, 4, 4};
                byte[] value = new byte[] { 5,5,5,5 };
                hashTable.Put(key, value);
                hashTable.Close();

                hashTable = new PersistentHashTable(hastTableName);

                TestHelper.AssertByteArraysAreSame(value, hashTable.Get(key));
            }
            finally
            {
                hashTable.Close();
            }
        }