http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/cppcache/integration-test/testEntriesMap.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testEntriesMap.cpp 
b/src/cppcache/integration-test/testEntriesMap.cpp
deleted file mode 100644
index 9b169b1..0000000
--- a/src/cppcache/integration-test/testEntriesMap.cpp
+++ /dev/null
@@ -1,777 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define ROOT_NAME "testEntriesMap"
-
-#include <iostream>
-
-#include "fw_helper.hpp"
-
-#ifdef WIN32
-
-BEGIN_TEST(NotOnWindows)
-  { LOG("Too many non-external symbols used too fix right now on windows."); }
-END_TEST(NotOnWindows)
-
-#else
-
-//#define BUILD_CPPCACHE 1
-#include <geode/GeodeCppCache.hpp>
-#include <LRUEntriesMap.hpp>
-#include <LRUMapEntry.hpp>
-#include <VersionTag.hpp>
-#include <cstdlib>
-#include <LocalRegion.hpp>
-
-using namespace apache::geode::client;
-
-typedef std::vector<MapEntryImplPtr> VectorOfMapEntry;
-
-CacheableStringPtr createCacheable(const char* value) {
-  CacheableStringPtr result = CacheableString::create(value);
-  ASSERT(result != nullptr, "expected result non-nullptr");
-  return result;
-}
-
-namespace {
-class FakeRegion : public RegionInternal {
- public:
-  FakeRegion() : RegionInternal(nullptr) {}
-  virtual void registerKeys(const VectorOfCacheableKey& keys,
-                            bool isDurable = false,
-                            bool getInitialValues = false,
-                            bool receiveValues = true) override {}
-  virtual void unregisterKeys(const VectorOfCacheableKey& keys) override {}
-  virtual void registerAllKeys(bool isDurable = false,
-                               VectorOfCacheableKeyPtr resultKeys = nullptr,
-                               bool getInitialValues = false,
-                               bool receiveValues = true) override {}
-  virtual void unregisterAllKeys() override {}
-
-  virtual void registerRegex(const char* regex, bool isDurable = false,
-                             VectorOfCacheableKeyPtr resultKeys = nullptr,
-                             bool getInitialValues = false,
-                             bool receiveValues = true) override {}
-  virtual void unregisterRegex(const char* regex) override {}
-
-  virtual SelectResultsPtr query(
-      const char* predicate,
-      uint32_t timeout = DEFAULT_QUERY_RESPONSE_TIMEOUT) override {
-    return nullptr;
-  }
-  virtual bool existsValue(
-      const char* predicate,
-      uint32_t timeout = DEFAULT_QUERY_RESPONSE_TIMEOUT) override {
-    return false;
-  }
-  virtual SerializablePtr selectValue(
-      const char* predicate,
-      uint32_t timeout = DEFAULT_QUERY_RESPONSE_TIMEOUT) override {
-    return nullptr;
-  }
-  virtual PersistenceManagerPtr getPersistenceManager() override {
-    return nullptr;
-  }
-  virtual void setPersistenceManager(PersistenceManagerPtr& pmPtr) override{};
-
-  virtual GfErrType getNoThrow(const CacheableKeyPtr& key, CacheablePtr& value,
-                               const UserDataPtr& aCallbackArgument) override {
-    return GF_NOERR;
-  }
-  virtual GfErrType getAllNoThrow(
-      const VectorOfCacheableKey& keys, const HashMapOfCacheablePtr& values,
-      const HashMapOfExceptionPtr& exceptions, bool addToLocalCache,
-      const UserDataPtr& aCallbackArgument) override {
-    return GF_NOERR;
-  }
-  virtual GfErrType putNoThrow(const CacheableKeyPtr& key,
-                               const CacheablePtr& value,
-                               const UserDataPtr& aCallbackArgument,
-                               CacheablePtr& oldValue, int updateCount,
-                               const CacheEventFlags eventFlags,
-                               VersionTagPtr versionTag,
-                               DataInput* delta = nullptr,
-                               EventIdPtr eventId = nullptr) override {
-    return GF_NOERR;
-  }
-  virtual GfErrType createNoThrow(const CacheableKeyPtr& key,
-                                  const CacheablePtr& value,
-                                  const UserDataPtr& aCallbackArgument,
-                                  int updateCount,
-                                  const CacheEventFlags eventFlags,
-                                  VersionTagPtr versionTag) override {
-    return GF_NOERR;
-  }
-  virtual GfErrType destroyNoThrow(const CacheableKeyPtr& key,
-                                   const UserDataPtr& aCallbackArgument,
-                                   int updateCount,
-                                   const CacheEventFlags eventFlags,
-                                   VersionTagPtr versionTag) override {
-    return GF_NOERR;
-  }
-  virtual GfErrType removeNoThrow(const CacheableKeyPtr& key,
-                                  const CacheablePtr& value,
-                                  const UserDataPtr& aCallbackArgument,
-                                  int updateCount,
-                                  const CacheEventFlags eventFlags,
-                                  VersionTagPtr versionTag) override {
-    return GF_NOERR;
-  }
-  virtual GfErrType invalidateNoThrow(const CacheableKeyPtr& keyPtr,
-                                      const UserDataPtr& aCallbackArgument,
-                                      int updateCount,
-                                      const CacheEventFlags eventFlags,
-                                      VersionTagPtr versionTag) override {
-    return GF_NOERR;
-  }
-  virtual GfErrType invalidateRegionNoThrow(
-      const UserDataPtr& aCallbackArgument,
-      const CacheEventFlags eventFlags) override {
-    return GF_NOERR;
-  }
-  virtual GfErrType destroyRegionNoThrow(
-      const UserDataPtr& aCallbackArgument, bool removeFromParent,
-      const CacheEventFlags eventFlags) override {
-    return GF_NOERR;
-  }
-
-  virtual void setRegionExpiryTask() override {}
-  virtual void acquireReadLock() override {}
-  virtual void releaseReadLock() override {}
-  // behaviors for attributes mutator
-  virtual uint32_t adjustLruEntriesLimit(uint32_t limit) override { return 0; }
-  virtual ExpirationAction::Action adjustRegionExpiryAction(
-      ExpirationAction::Action action) override {
-    return action;
-  }
-  virtual ExpirationAction::Action adjustEntryExpiryAction(
-      ExpirationAction::Action action) override {
-    return action;
-  }
-  virtual int32_t adjustRegionExpiryDuration(int32_t duration) override {
-    return 0;
-  }
-  virtual int32_t adjustEntryExpiryDuration(int32_t duration) override {
-    return 0;
-  }
-  virtual void adjustCacheListener(const CacheListenerPtr& aListener) override 
{
-  }
-  virtual void adjustCacheListener(const char* libpath,
-                                   const char* factoryFuncName) override {}
-  virtual void adjustCacheLoader(const CacheLoaderPtr& aLoader) override {}
-  virtual void adjustCacheLoader(const char* libpath,
-                                 const char* factoryFuncName) override {}
-  virtual void adjustCacheWriter(const CacheWriterPtr& aWriter) override {}
-  virtual void adjustCacheWriter(const char* libpath,
-                                 const char* factoryFuncName) override {}
-  virtual RegionStats* getRegionStats() override { return nullptr; }
-  virtual bool cacheEnabled() override { return 0; }
-  virtual bool isDestroyed() const override { return 0; }
-  virtual void evict(int32_t percentage) override {}
-  virtual CacheImpl* getCacheImpl() const override { return nullptr; }
-  virtual TombstoneListPtr getTombstoneList() override { return nullptr; }
-
-  virtual void updateAccessAndModifiedTime(bool modified) override {}
-  virtual void updateAccessAndModifiedTimeForEntry(MapEntryImplPtr& ptr,
-                                                   bool modified) override {}
-  virtual void addDisMessToQueue() override {}
-
-  virtual void txDestroy(const CacheableKeyPtr& key,
-                         const UserDataPtr& callBack,
-                         VersionTagPtr versionTag) override {}
-  virtual void txInvalidate(const CacheableKeyPtr& key,
-                            const UserDataPtr& callBack,
-                            VersionTagPtr versionTag) override {}
-  virtual void txPut(const CacheableKeyPtr& key, const CacheablePtr& value,
-                     const UserDataPtr& callBack,
-                     VersionTagPtr versionTag) override {}
-  virtual const PoolPtr& getPool() override { throw "not implemented"; }
-
-  virtual void destroyRegion(
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-  virtual void clear(const UserDataPtr& aCallbackArgument = nullptr) override 
{}
-  virtual void localClear(
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-  virtual void localDestroyRegion(
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-  virtual RegionPtr getSubregion(const char* path) override { return nullptr; }
-  virtual RegionPtr createSubregion(
-      const char* subregionName,
-      const RegionAttributesPtr& aRegionAttributes) override {
-    return nullptr;
-  }
-  virtual void subregions(const bool recursive, VectorOfRegion& sr) override {}
-  virtual RegionEntryPtr getEntry(const CacheableKeyPtr& key) override {
-    return nullptr;
-  }
-
-  virtual CacheablePtr get(
-      const CacheableKeyPtr& key,
-      const UserDataPtr& aCallbackArgument = nullptr) override {
-    return nullptr;
-  }
-
-  virtual void put(const CacheableKeyPtr& key, const CacheablePtr& value,
-                   const UserDataPtr& aCallbackArgument = nullptr) override {}
-
-  virtual void putAll(const HashMapOfCacheable& map,
-                      uint32_t timeout = DEFAULT_RESPONSE_TIMEOUT,
-                      const UserDataPtr& aCallbackArgument = nullptr) override 
{
-  }
-  virtual void localPut(
-      const CacheableKeyPtr& key, const CacheablePtr& value,
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-
-  virtual void localCreate(
-      const CacheableKeyPtr& key, const CacheablePtr& value,
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-  virtual void invalidate(
-      const CacheableKeyPtr& key,
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-
-  virtual void localInvalidate(
-      const CacheableKeyPtr& key,
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-  virtual void destroy(
-      const CacheableKeyPtr& key,
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-
-  virtual void localDestroy(
-      const CacheableKeyPtr& key,
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-
-  virtual bool remove(const CacheableKeyPtr& key, const CacheablePtr& value,
-                      const UserDataPtr& aCallbackArgument = nullptr) override 
{
-    return false;
-  }
-
-  virtual bool removeEx(
-      const CacheableKeyPtr& key,
-      const UserDataPtr& aCallbackArgument = nullptr) override {
-    return false;
-  }
-
-  virtual bool localRemove(
-      const CacheableKeyPtr& key, const CacheablePtr& value,
-      const UserDataPtr& aCallbackArgument = nullptr) override {
-    return false;
-  }
-
-  virtual bool localRemoveEx(
-      const CacheableKeyPtr& key,
-      const UserDataPtr& aCallbackArgument = nullptr) override {
-    return false;
-  }
-  virtual void keys(VectorOfCacheableKey& v) override {}
-  virtual void serverKeys(VectorOfCacheableKey& v) override {}
-  virtual void values(VectorOfCacheable& vc) override {}
-  virtual void entries(VectorOfRegionEntry& me, bool recursive) override {}
-  virtual void getAll(const VectorOfCacheableKey& keys,
-                      HashMapOfCacheablePtr values,
-                      HashMapOfExceptionPtr exceptions,
-                      bool addToLocalCache = false,
-                      const UserDataPtr& aCallbackArgument = nullptr) override 
{
-  }
-  virtual void removeAll(
-      const VectorOfCacheableKey& keys,
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-  virtual uint32_t size() override { return 0; }
-  virtual const char* getName() const override { return nullptr; }
-  virtual const char* getFullPath() const override { return nullptr; }
-  virtual RegionPtr getParentRegion() const override { return nullptr; }
-  virtual RegionAttributesPtr getAttributes() const override { return nullptr; 
}
-  virtual AttributesMutatorPtr getAttributesMutator() const override {
-    return nullptr;
-  }
-  virtual CacheStatisticsPtr getStatistics() const override { return nullptr; }
-  virtual void invalidateRegion(
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-  virtual void localInvalidateRegion(
-      const UserDataPtr& aCallbackArgument = nullptr) override {}
-  virtual void create(const CacheableKeyPtr& key, const CacheablePtr& value,
-                      const UserDataPtr& aCallbackArgument = nullptr) override 
{
-  }
-  virtual RegionServicePtr getRegionService() const override { return nullptr; 
}
-  virtual bool containsValueForKey(
-      const CacheableKeyPtr& keyPtr) const override {
-    return false;
-  }
-  virtual bool containsKey(const CacheableKeyPtr& keyPtr) const override {
-    return false;
-  }
-  virtual bool containsKeyOnServer(
-      const CacheableKeyPtr& keyPtr) const override {
-    return false;
-  }
-  virtual void getInterestList(VectorOfCacheableKey& vlist) const override {}
-  virtual void getInterestListRegex(
-      VectorOfCacheableString& vregex) const override {}
-};
-}  // namespace
-
-BEGIN_TEST(PutAndGet)
-  {
-    CacheableStringPtr ccstr = createCacheable("100");
-    CacheablePtr ct = ccstr;
-    EntryFactory* entryFactory = EntryFactory::singleton;
-    AttributesFactory af;
-    auto region = std::make_shared<FakeRegion>();
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, false, region.get());
-    entries->open();
-    CacheableKeyPtr keyPtr = CacheableKey::create((char*)"foobar");
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    MapEntryImplPtr me;
-    VersionTagPtr versionTag;
-    CacheablePtr oldValue;
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    CacheablePtr myValuePtr;
-    entries->get(keyPtr, myValuePtr, me);
-    ASSERT(myValuePtr != nullptr, "expected non-nullptr");
-    auto strValue = std::dynamic_pointer_cast<CacheableString>(myValuePtr);
-    ASSERT(ccstr->operator==(*strValue), "expected 100");
-    delete entries;
-  }
-END_TEST(PutAndGet)
-
-BEGIN_TEST(CheckMapEntryImplPtr)
-  {
-    char error[1000] ATTR_UNUSED;
-    MapEntryImplPtr mePtr;
-    ASSERT(mePtr == nullptr, "expected mePtr to be nullptr");
-    CacheableKeyPtr keyPtr = CacheableKey::create(fwtest_Name);
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    EntryFactory::singleton->newMapEntry(keyPtr, mePtr);
-    ASSERT(mePtr != nullptr, "expected to not be null.");
-  }
-END_TEST(CheckMapEntryImplPtr)
-
-BEGIN_TEST(RemoveTest)
-  {
-    CacheableStringPtr cst = createCacheable("200");
-    CacheablePtr ct = cst;
-    EntryFactory* entryFactory = EntryFactory::singleton;
-    auto region = std::make_shared<FakeRegion>();
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, false, region.get());
-    entries->open();
-    CacheableKeyPtr keyPtr = CacheableKey::create(fwtest_Name);
-    MapEntryImplPtr me;
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    CacheablePtr oldValue;
-    VersionTagPtr versionTag;
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    CacheablePtr myValuePtr;
-    (void)entries->remove(keyPtr, myValuePtr, me, -1, versionTag, false);
-    auto resPtr = std::dynamic_pointer_cast<CacheableString>(myValuePtr);
-    ASSERT(myValuePtr != nullptr, "expected to not be null.");
-    ASSERT(resPtr->operator==(*createCacheable("200")),
-           "CustomerType with m_foobar 200.");
-    (void)entries->remove(keyPtr, myValuePtr, me, -1, versionTag, false);
-    ASSERT(myValuePtr == nullptr,
-           "expected already removed, and null result should clear ptr.");
-  }
-END_TEST(RemoveTest)
-
-BEGIN_TEST(GetEntryTest)
-  {
-    CacheableStringPtr cst = createCacheable("200");
-    CacheablePtr ct = cst;
-    EntryFactory* entryFactory = EntryFactory::singleton;
-    auto region = std::make_shared<FakeRegion>();
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, false, region.get());
-    entries->open();
-    CacheableKeyPtr keyPtr;
-    MapEntryImplPtr me;
-    keyPtr = CacheableKey::create(fwtest_Name);
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    CacheablePtr oldValue;
-    VersionTagPtr versionTag;
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    MapEntryImplPtr mePtr;
-    CacheablePtr ctPtr;
-    entries->getEntry(keyPtr, mePtr, ctPtr);
-    ASSERT(mePtr != nullptr, "should not be null.");
-    auto valPtr = std::dynamic_pointer_cast<CacheableString>(ctPtr);
-    ASSERT(valPtr->operator==(*cst),
-           "Entry should have a CustomerType Value of 200");
-    CacheableKeyPtr keyPtr1;
-    mePtr->getKey(keyPtr1);
-    ASSERT(keyPtr1->operator==(*keyPtr), "should have same key.");
-  }
-END_TEST(GetEntryTest)
-
-BEGIN_TEST(MapEntryImplPtrRCTest)
-  {
-    // Test Reference Counting and destruction for MapEntry.
-    CacheableKeyPtr keyPtr = CacheableKey::create("foobar");
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    MapEntryImplPtr mePtr;
-    EntryFactory ef;
-    ef.newMapEntry(keyPtr, mePtr);
-    CacheablePtr ct = createCacheable("someval");
-    mePtr->setValue(ct);
-  }
-END_TEST(MapEntryImplPtrRCTest)
-
-BEGIN_TEST(VectorOfMapEntryTestA)
-  {
-    VectorOfMapEntry* meVec = new VectorOfMapEntry();
-    delete meVec;
-  }
-END_TEST(VectorOfMapEntryTestA)
-
-BEGIN_TEST(VectorOfMapEntryTestB)
-  {
-    VectorOfMapEntry* meVec = new VectorOfMapEntry();
-    meVec->resize(100);
-    meVec->clear();
-    meVec->resize(10);
-    MapEntryImplPtr mePtr;
-    for (int i = 0; i < 10; i++) {
-      meVec->push_back(mePtr);
-    }
-    for (int j = 0; j < 10; j++) {
-      meVec->pop_back();
-    }
-    delete meVec;
-  }
-END_TEST(VectorOfMapEntryTestB)
-
-BEGIN_TEST(EntriesTest)
-  {
-    EntryFactory* entryFactory = EntryFactory::singleton;
-    auto region = std::make_shared<FakeRegion>();
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, false, region.get());
-    entries->open();
-    char keyBuf[100];
-    char valBuf[100];
-    VersionTagPtr versionTag;
-    MapEntryImplPtr me;
-    for (int i = 0; i < 10; i++) {
-      sprintf(keyBuf, "key_%d", i);
-      sprintf(valBuf, "%d", i);
-      CacheableKeyPtr keyPtr = CacheableKey::create(keyBuf);
-      ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-      CacheablePtr v = createCacheable(valBuf);
-      CacheablePtr oldValue;
-      entries->put(keyPtr, v, me, oldValue, -1, 0, versionTag);
-    }
-    VectorOfRegionEntry* entriesVec = new VectorOfRegionEntry();
-    entriesVec->resize(1);
-    entries->entries(*entriesVec);
-    // should be 10, but they are hashed so, we don't know what order they will
-    // come in...
-    int total = 0;
-    int expectedTotal = 0;
-    for (int k = 0; k < 10; k++) {
-      expectedTotal += k;
-      RegionEntryPtr rePtr = entriesVec->back();
-      CacheableStringPtr ctPtr;
-      CacheablePtr ccPtr;
-      ccPtr = rePtr->getValue();
-      ctPtr = std::dynamic_pointer_cast<CacheableString>(ccPtr);
-      std::cout << "value is " << ctPtr->asChar() << std::endl;
-      int val = atoi(ctPtr->asChar());
-      std::cout << "atoi returned " << val << std::endl;
-      total += val;
-      entriesVec->pop_back();
-    }
-    entriesVec->clear();
-    entriesVec->resize(0);
-    delete entriesVec;
-    sprintf(keyBuf, "total = %d, expected = %d", total, expectedTotal);
-    ASSERT(total == expectedTotal, keyBuf);
-    delete entries;
-  }
-END_TEST(EntriesTest)
-
-BEGIN_TEST(ValuesTest)
-  {
-    EntryFactory* entryFactory = EntryFactory::singleton;
-    auto region = std::make_shared<FakeRegion>();
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, false, region.get());
-    entries->open();
-    char keyBuf[100];
-    char valBuf[100];
-    VersionTagPtr versionTag;
-    MapEntryImplPtr me;
-    for (int i = 0; i < 10; i++) {
-      sprintf(keyBuf, "key_%d", i);
-      sprintf(valBuf, "%d", i);
-      CacheableKeyPtr keyPtr = CacheableKey::create(keyBuf);
-      ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-      CacheablePtr v = createCacheable(valBuf);
-      CacheablePtr oldValue;
-      entries->put(keyPtr, v, me, oldValue, -1, 0, versionTag);
-    }
-    VectorOfCacheable* valuesVec = new VectorOfCacheable();
-    valuesVec->resize(1);
-    entries->values(*valuesVec);
-    // should be 10, but they are hashed so, we don't know what order they will
-    // come in...
-    int total = 0;
-    int expectedTotal = 0;
-    for (int k = 0; k < 10; k++) {
-      expectedTotal += k;
-      auto valuePtr =
-          std::dynamic_pointer_cast<CacheableString>(valuesVec->back());
-      total += atoi(valuePtr->asChar());
-      valuesVec->pop_back();
-    }
-    delete valuesVec;
-    sprintf(keyBuf, "total = %d, expected = %d", total, expectedTotal);
-    ASSERT(total == expectedTotal, keyBuf);
-    delete entries;
-  }
-END_TEST(ValuesTest)
-
-BEGIN_TEST(KeysTest)
-  {
-    EntryFactory* entryFactory = EntryFactory::singleton;
-    auto region = std::make_shared<FakeRegion>();
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, false, region.get());
-    entries->open();
-    char keyBuf[100];
-    char valBuf[100];
-    VersionTagPtr versionTag;
-    MapEntryImplPtr me;
-    for (int i = 0; i < 10; i++) {
-      sprintf(keyBuf, "key_%d", i);
-      sprintf(valBuf, "%d", i);
-      CacheableKeyPtr keyPtr = CacheableKey::create(keyBuf);
-      ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-      CacheablePtr v = createCacheable(valBuf);
-      CacheablePtr oldValue;
-      entries->put(keyPtr, v, me, oldValue, -1, 0, versionTag);
-    }
-    VectorOfCacheableKey keysVec;
-    // keysVec.resize( 1 );
-    entries->keys(keysVec);
-    // should be 10, but they are hashed so, we don't know what order they will
-    // come in...
-    int total = 0;
-    int expectedTotal = 0;
-    for (int k = 0; k < 10; k++) {
-      expectedTotal += k;
-      CacheableKeyPtr keyPtr = keysVec.back();
-      CacheablePtr cvPtr;
-      entries->get(keyPtr, cvPtr, me);
-      auto valuePtr = std::dynamic_pointer_cast<CacheableString>(cvPtr);
-      total += atoi(valuePtr->asChar());
-      keysVec.pop_back();
-    }
-    sprintf(keyBuf, "total = %d, expected = %d", total, expectedTotal);
-    ASSERT(total == expectedTotal, keyBuf);
-    delete entries;
-  }
-END_TEST(KeysTest)
-
-BEGIN_TEST(TestRehash)
-  {
-    EntryFactory* entryFactory = EntryFactory::singleton;
-    ConcurrentEntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, false, nullptr, 1);
-    entries->open(10);
-    ASSERT(entries->totalSegmentRehashes() == 0,
-           "should not have rehashed yet.");
-    char keyBuf[100];
-    char valBuf[100];
-    MapEntryImplPtr me;
-
-    for (uint32_t i = 0; i < 10000; i++) {
-      sprintf(keyBuf, "key_%d", i);
-      sprintf(valBuf, "%d", i);
-      CacheableKeyPtr keyPtr = CacheableKey::create(keyBuf);
-      ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-      CacheablePtr v = createCacheable(valBuf);
-      CacheablePtr oldValue;
-      VersionTagPtr versionTag;
-      entries->put(keyPtr, v, me, oldValue, -1, 0, versionTag);
-    }
-    // check rehash count...
-    ASSERT(entries->totalSegmentRehashes() > 0,
-           "should have rehashed several times.");
-    // VectorOfMapEntry result ;
-    // entries->entries( result );
-    //  printf("entries->size()=%d\n", entries->size());
-    ASSERT(entries->size() == 10000, "should be 10k items");
-    for (uint32_t j = 0; j < 10000; j++) {
-      sprintf(keyBuf, "key_%d", j);
-      CacheableStringPtr valuePtr;
-      CacheableKeyPtr keyPtr = CacheableKey::create(keyBuf);
-      ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-      CacheablePtr cvPtr;
-      entries->get(keyPtr, cvPtr, me);
-      valuePtr = std::dynamic_pointer_cast<CacheableString>(cvPtr);
-      if (valuePtr == nullptr) {
-        std::cout << "error finding key: " << keyBuf << std::endl;
-        FAIL("should have found value for all keys after rehash.");
-      }
-    }
-  }
-END_TEST(TestRehash)
-
-//---- LRU variants
-
-BEGIN_TEST(LRUPutAndGet)
-  {
-    CacheableStringPtr cst = createCacheable("100");
-    CacheablePtr ct = cst;
-    MapEntryImplPtr me;
-    EntryFactory* entryFactory = LRUEntryFactory::singleton;
-    EntriesMap* entries = new LRUEntriesMap(
-        entryFactory, nullptr, LRUAction::LOCAL_DESTROY, 20, false);
-    entries->open();
-    ASSERT(entries->size() == 0, "expected size 0.");
-    CacheableKeyPtr keyPtr = CacheableKey::create("foobar");
-    CacheablePtr oldValue;
-    VersionTagPtr versionTag;
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    ASSERT(entries->size() == 1, "expected size 1.");
-    CacheableStringPtr myValuePtr;
-    CacheablePtr cvPtr;
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    entries->get(keyPtr, cvPtr, me);
-    myValuePtr = std::dynamic_pointer_cast<CacheableString>(cvPtr);
-    ASSERT(myValuePtr != nullptr, "expected non-nullptr");
-    ASSERT(cst->operator==(*myValuePtr), "expected 100");
-    delete entries;
-  }
-END_TEST(LRUPutAndGet)
-
-BEGIN_TEST(CheckLRUMapEntryImplPtr)
-  {
-    char error[1000] ATTR_UNUSED;
-    MapEntryImplPtr mePtr;
-    ASSERT(mePtr == nullptr, "expected mePtr to be nullptr");
-    CacheableKeyPtr keyPtr = CacheableKey::create(fwtest_Name);
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    LRUEntryFactory::singleton->newMapEntry(keyPtr, mePtr);
-    ASSERT(mePtr != nullptr, "expected to not be null.");
-    auto lmePtr = std::dynamic_pointer_cast<LRUMapEntry>(mePtr);
-    ASSERT(lmePtr != nullptr, "expected to cast successfully to LRUMapEntry.");
-  }
-END_TEST(LRUCheckMapEntryImplPtr)
-
-BEGIN_TEST(LRURemoveTest)
-  {
-    CacheableStringPtr cst = createCacheable("200");
-    CacheablePtr ct = cst;
-    EntryFactory* entryFactory = LRUEntryFactory::singleton;
-    EntriesMap* entries = new LRUEntriesMap(
-        entryFactory, nullptr, LRUAction::LOCAL_DESTROY, 20, false);
-    entries->open();
-    ASSERT(entries->size() == 0, "expected size 0.");
-    CacheableKeyPtr keyPtr;
-    MapEntryImplPtr me;
-    keyPtr = CacheableKey::create(fwtest_Name);
-    CacheablePtr oldValue;
-    VersionTagPtr versionTag;
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    ASSERT(entries->size() == 1, "expected size 1.");
-    CacheableStringPtr myValuePtr;
-    CacheablePtr cvPtr;
-    (void)entries->remove(keyPtr, cvPtr, me, -1, versionTag, false);
-    myValuePtr = std::dynamic_pointer_cast<CacheableString>(cvPtr);
-    ASSERT(entries->size() == 0, "expected size 0.");
-    ASSERT(cvPtr != nullptr, "expected to not be null.");
-    ASSERT(myValuePtr->operator==(*createCacheable("200")),
-           "CustomerType with m_foobar 200.");
-
-    (void)entries->remove(keyPtr, cvPtr, me, -1, versionTag, false);
-    ASSERT(cvPtr == nullptr,
-           "expected already removed, and null result should clear ptr.");
-  }
-END_TEST(LRURemoveTest)
-
-BEGIN_TEST(LRUGetEntryTest)
-  {
-    CacheableStringPtr cst = createCacheable("200");
-    CacheablePtr ct = cst;
-    EntryFactory* entryFactory = LRUEntryFactory::singleton;
-    EntriesMap* entries = new LRUEntriesMap(
-        entryFactory, nullptr, LRUAction::LOCAL_DESTROY, 20, false);
-    entries->open();
-    CacheableKeyPtr keyPtr;
-    MapEntryImplPtr me;
-    keyPtr = CacheableKey::create(fwtest_Name);
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    CacheablePtr oldValue;
-    VersionTagPtr versionTag;
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    ASSERT(entries->size() == 1, "expected size 1.");
-    MapEntryImplPtr mePtr;
-    CacheablePtr cvPtr;
-    entries->getEntry(keyPtr, mePtr, cvPtr);
-    ASSERT(mePtr != nullptr, "should not be null.");
-    CacheableStringPtr ctPtr;
-    ctPtr = std::dynamic_pointer_cast<CacheableString>(cvPtr);
-    ASSERT(ctPtr->operator==(*cst),
-           "Entry should have a CustomerType Value of 200");
-    CacheableKeyPtr keyPtr1;
-    mePtr->getKey(keyPtr1);
-    ASSERT(keyPtr1->operator==(*keyPtr), "should have same key.");
-  }
-END_TEST(LRUGetEntryTest)
-
-BEGIN_TEST(LRULimitEvictTest)
-  {
-    EntryFactory* entryFactory = LRUEntryFactory::singleton;
-    EntriesMap* entries = new LRUEntriesMap(entryFactory, nullptr,
-                                            LRUAction::LOCAL_DESTROY, 5, 
false);
-    entries->open();
-    MapEntryImplPtr me;
-    CacheablePtr ct = createCacheable("somevalue");
-    CacheablePtr oldValue;
-    CacheableKeyPtr keyPtr = CacheableKey::create("1");
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    VersionTagPtr versionTag;
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    ASSERT(entries->size() == 1, "expected size 1.");
-    keyPtr = CacheableKey::create("2");
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    ASSERT(entries->size() == 2, "expected size 2.");
-    keyPtr = CacheableKey::create("3");
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    ASSERT(entries->size() == 3, "expected size 3.");
-    keyPtr = CacheableKey::create("4");
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    ASSERT(entries->size() == 4, "expected size 4.");
-    keyPtr = CacheableKey::create("5");
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    ASSERT(entries->size() == 5, "expected size 5.");
-    LOG("Map is now at the limit.");
-    keyPtr = CacheableKey::create("6");
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    LOG("About to spill over.");
-    entries->put(keyPtr, ct, me, oldValue, -1, 0, versionTag);
-    LOG("Spilled over.");
-    ASSERT(entries->size() == 5, "expected size 5.");
-    LOG("Limit was preserved.");
-  }
-END_TEST(LRULimitEvictTest)
-
-#endif

http://git-wip-us.apache.org/repos/asf/geode-native/blob/da389793/src/cppcache/integration-test/testEntriesMapForVersioning.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testEntriesMapForVersioning.cpp 
b/src/cppcache/integration-test/testEntriesMapForVersioning.cpp
deleted file mode 100644
index d93ae4c..0000000
--- a/src/cppcache/integration-test/testEntriesMapForVersioning.cpp
+++ /dev/null
@@ -1,1297 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <geode/geode_base.hpp>
-
-#include "fw_dunit.hpp"
-
-#ifdef WIN32
-
-#define CLIENT1 s1p1
-DUNIT_TASK_DEFINITION(CLIENT1, CREATECLIENT)
-  { LOG("This test doesn't run on windows. Too many classes to export."); }
-END_TASK_DEFINITION
-void runTask() { CALL_TASK(CREATECLIENT); }
-DUNIT_MAIN
-  { runTask(); }
-END_MAIN
-
-#else
-
-//#define BUILD_CPPCACHE 1
-#include <geode/GeodeCppCache.hpp>
-#include <LRUEntriesMap.hpp>
-#include <LRUMapEntry.hpp>
-#include <LRUExpMapEntry.hpp>
-#include <VersionTag.hpp>
-#include <cstdlib>
-#include <ClientProxyMembershipID.hpp>
-#include <ace/OS.h>
-#include <string>
-#include <vector>
-#include <LocalRegion.hpp>
-#include <geode/DataInput.hpp>
-#include "DeltaEx.hpp"
-#include "CacheableToken.hpp"
-#include "DiskStoreId.hpp"
-#include "DiskVersionTag.hpp"
-#include "DSMemberForVersionStamp.hpp"
-#include "CachePerfStats.hpp"
-#define ROOT_SCOPE LOCAL
-
-#include "CacheHelper.hpp"
-
-#define CLIENT1 s1p1
-
-using namespace apache::geode::client;
-using namespace test;
-
-CacheHelper* cacheHelper = nullptr;
-RegionPtr regPtr;
-
-const char* endpoints = nullptr;
-
-void initClient() {
-  if (cacheHelper == nullptr) {
-    PropertiesPtr configPtr = Properties::create();
-    configPtr->insert("tombstone-timeout", 5000);
-    cacheHelper = new CacheHelper(true, configPtr);
-  }
-  ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
-}
-void cleanProc() {
-  if (cacheHelper != nullptr) {
-    delete cacheHelper;
-    cacheHelper = nullptr;
-  }
-}
-
-CacheHelper* getHelper() {
-  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
-  return cacheHelper;
-}
-
-void createRegion(const char* name, bool ackMode,
-                  bool clientNotificationEnabled = false, bool caching = true) 
{
-  LOG("createRegion() entered.");
-  fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
-  fflush(stdout);
-  // ack, caching
-  regPtr =
-      getHelper()->createRegion(name, ackMode, caching, nullptr,
-                                clientNotificationEnabled, true, true, 5000);
-  ASSERT(regPtr != nullptr, "Failed to create region.");
-  LOG("Region created.");
-}
-
-typedef std::vector<MapEntryImplPtr> VectorOfMapEntry;
-
-CacheableStringPtr createCacheable(const char* value) {
-  CacheableStringPtr result = CacheableString::create(value);
-  ASSERT(result != nullptr, "expected result non-nullptr");
-  return result;
-}
-
-uint8_t addr1[6] = {0xff, 0xff, 0xff, 0xaa, 0xff, 0xff};
-uint8_t addr2[6] = {0xff, 0xff, 0xff, 0xaa, 0xff, 0xbb};
-uint8_t addr3[6] = {0xff, 0xff, 0xaa, 0xaa, 0xff, 0xff};
-uint8_t addr4[6] = {0xff, 0xff, 0xff, 0xff, 0xaa, 0xff};
-
-auto member_host1 = std::make_shared<ClientProxyMembershipID>(addr1, 6, 80, "",
-                                                              "myuniquetag", 
0);
-auto member_host12 = std::make_shared<ClientProxyMembershipID>(
-    addr1, 6, 80, "", "myuniquetah", 0);
-auto member_host13 = std::make_shared<ClientProxyMembershipID>(
-    addr1, 6, 81, "", "myuniquetag", 0);
-auto member_host14 = std::make_shared<ClientProxyMembershipID>(
-    addr1, 6, 88, "", "myuniquetag", 0);
-auto member_host15 = std::make_shared<ClientProxyMembershipID>(
-    addr2, 6, 88, "", "myuniquetag", 0);
-auto member_host16 = std::make_shared<ClientProxyMembershipID>(
-    addr3, 6, 88, "", "myuniquetag", 0);
-auto member_host17 = std::make_shared<ClientProxyMembershipID>(
-    addr4, 6, 88, "", "myuniquetag", 0);
-auto diskStore17 = new DiskStoreId(1, 7);
-auto diskStore18 = new DiskStoreId(1, 8);
-auto diskStore27 = new DiskStoreId(2, 7);
-auto member_host_vmview5 =
-    std::make_shared<ClientProxyMembershipID>(addr4, 6, 88, "", "", 5);
-auto member_host_vmview6 =
-    std::make_shared<ClientProxyMembershipID>(addr4, 6, 88, "", "", 6);
-auto member_host_vmview7 =
-    std::make_shared<ClientProxyMembershipID>(addr4, 6, 88, "", "", 7);
-
-uint16_t host1;
-uint16_t host12;
-uint16_t host13;
-uint16_t host14;
-uint16_t host15;
-uint16_t host16;
-uint16_t host17;
-uint16_t disk17;
-uint16_t disk18;
-uint16_t disk27;
-uint16_t hostVmview5;
-uint16_t hostVmview6;
-uint16_t hostVmview7;
-
-int DeltaEx::toDeltaCount = 0;
-int DeltaEx::toDataCount = 0;
-int DeltaEx::fromDeltaCount = 0;
-int DeltaEx::fromDataCount = 0;
-int DeltaEx::cloneCount = 0;
-
-//#undef DUNIT_TASK_DEFINITION
-//#define DUNIT_TASK_DEFINITION(_X, _Y) void _Y()
-//#undef END_TASK_DEFINITION
-//#define END_TASK_DEFINITION
-//#undef CALL_TASK
-//#define CALL_TASK(_Y) _Y()
-
-DUNIT_TASK_DEFINITION(CLIENT1, CREATECLIENT)
-  {
-    initClient();
-    createRegion("myregion", true, false);
-    LOG("StepOne complete.");
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, CloseCache1)
-  { cleanProc(); }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepOne_AddHosts)
-  {
-    auto lregPtr = std::dynamic_pointer_cast<LocalRegion>(regPtr);
-    host1 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        member_host1);
-    host12 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        member_host12);
-    host13 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        member_host13);
-    host14 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        member_host14);
-    host15 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        member_host15);
-    host16 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        member_host16);
-    host17 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        member_host17);
-    disk17 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        DSMemberForVersionStampPtr(diskStore17));
-    disk18 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        DSMemberForVersionStampPtr(diskStore18));
-    disk27 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        DSMemberForVersionStampPtr(diskStore27));
-    hostVmview5 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        member_host_vmview5);
-    hostVmview6 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        member_host_vmview6);
-    hostVmview7 = lregPtr->getCacheImpl()->getMemberListForVersionStamp()->add(
-        member_host_vmview7);
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepTwo_TestPut)
-  {
-    auto lregPtr = std::dynamic_pointer_cast<LocalRegion>(regPtr);
-    auto ccstr = createCacheable("100");
-    auto ccstr1 = createCacheable("500");
-    auto entryFactory = EntryFactory::singleton;
-    entryFactory->setConcurrencyChecksEnabled(true);
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, true, lregPtr.get());
-    entries->open();
-    auto keyPtr = CacheableKey::create("key1");
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    MapEntryImplPtr me;
-    auto versionTag1 = std::make_shared<VersionTag>(5, 6, 7, host1, 0);
-
-    auto versionTag12 = std::make_shared<VersionTag>(5, 6, 7, host12, 0);
-
-    auto versionTag13 = std::make_shared<VersionTag>(5, 6, 7, host13, 0);
-    auto versionTag14 = std::make_shared<VersionTag>(5, 6, 7, host14, 0);
-    auto versionTag15 = std::make_shared<VersionTag>(5, 6, 7, host15, 0);
-    auto versionTag16 = std::make_shared<VersionTag>(5, 6, 7, host16, 0);
-    auto versionTag17 = std::make_shared<VersionTag>(5, 6, 7, host17, 0);
-
-    CacheablePtr oldValue;
-    entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag1);
-    char log[256];
-
-    auto err = entries->put(keyPtr, ccstr1, me, oldValue, -1, 0, versionTag12);
-    ASSERT(err != GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->put(keyPtr, ccstr1, me, oldValue, -1, 0, versionTag13);
-    ASSERT(err != GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    uint32_t conflatedEvents =
-        lregPtr->getCacheImpl()->m_cacheStats->getConflatedEvents();
-    ASSERT(conflatedEvents == 2, "conflated events should be 2");
-
-    err = entries->put(keyPtr, ccstr1, me, oldValue, -1, 0, versionTag14);
-    ASSERT(err != GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->put(keyPtr, ccstr1, me, oldValue, -1, 0, versionTag15);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->put(keyPtr, ccstr1, me, oldValue, -1, 0, versionTag16);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->put(keyPtr, ccstr1, me, oldValue, -1, 0, versionTag17);
-    ASSERT(err != GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    MapEntryImplPtr result;
-    CacheablePtr value;
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 500, "an exception");
-    ASSERT(me->getVersionStamp().getMemberId() == 7, "an exception");
-
-    auto versionTag18 = std::make_shared<VersionTag>(0xffffaa, 6, 7, host1, 0);
-
-    // version rollover, this will not be applied
-    err = entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag18);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 500, "an exception");
-    ASSERT(me->getVersionStamp().getMemberId() == 7, "an exception");
-
-    auto keyPtr2 = CacheableKey::create("Key2");
-    err = entries->put(keyPtr2, ccstr, me, oldValue, -1, 0, versionTag18);
-    ASSERT(err != GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    entries->getEntry(keyPtr2, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 100, "an exception");
-    ASSERT(me->getVersionStamp().getMemberId() == 1, "an exception");
-
-    // version rollover, this will be applied
-    err = entries->put(keyPtr2, ccstr1, me, oldValue, -1, 0, versionTag12);
-    ASSERT(err != GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    entries->getEntry(keyPtr2, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 500, "an exception");
-    ASSERT(me->getVersionStamp().getMemberId() == 2, "an exception");
-
-    // Null version tag, this will be applied
-    VersionTagPtr versionTag19;
-    err = entries->put(keyPtr2, ccstr, me, oldValue, -1, 0, versionTag19);
-    ASSERT(err != GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    entries->getEntry(keyPtr2, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 100, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-
-    // inserts a null tag
-    auto keyPtr3 = CacheableKey::create("Key3");
-    err = entries->put(keyPtr3, ccstr1, me, oldValue, -1, 0, versionTag19);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr3, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 500, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 0, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 0, "an exception");
-
-    // inserts an entry with version stamp, the previous entry is without
-    // version
-    // stamp,
-    // should be allowed.
-    err = entries->put(keyPtr3, ccstr1, me, oldValue, -1, 0, versionTag12);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr3, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 500, "an exception");
-    ASSERT(me->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-
-    try {
-      Serializable::registerType(DeltaEx::create);
-    } catch (IllegalStateException&) {
-      //  ignore exception caused by type reregistration.
-    }
-    DeltaEx::toDeltaCount = 0;
-    DeltaEx::toDataCount = 0;
-    sprintf(log, "Some delta tests...");
-    LOG(log);
-
-    auto keyPtr4 = CacheableKey::create("Key4");
-    auto valPtr = std::make_shared<DeltaEx>();
-    err = entries->put(keyPtr4, valPtr, me, oldValue, -1, 0, versionTag12);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr4, result, value);
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-    ASSERT(DeltaEx::fromDeltaCount == 0, " Delta count should have been 0 ");
-
-    auto valPtr1 = std::make_shared<DeltaEx>();
-    valPtr1->setDelta(true);
-    DataOutput doutput;
-    doutput.writeInt(1);
-    const auto buffer = doutput.getBuffer();
-
-    DataInput datainput(buffer, doutput.getBufferLength());
-
-    bool isUpdate;
-    auto versionTag12plus =
-        std::make_shared<VersionTag>(6, 6, 7, host13, host12);
-    err = entries->put(keyPtr4, valPtr1, me, oldValue, -1, 0, versionTag12plus,
-                       isUpdate, &datainput);
-
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr4, result, value);
-    ASSERT(result->getVersionStamp().getMemberId() == 3, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 6, "an exception");
-    ASSERT(DeltaEx::fromDeltaCount == 1, " Delta count should have been 1 ");
-
-    // Delta update, Not allowed as same tag and stamp versions
-    err = entries->put(keyPtr4, valPtr1, me, oldValue, -1, 0, versionTag12plus,
-                       isUpdate, &datainput);
-    ASSERT(err == GF_INVALID_DELTA, "an exception");
-    entries->getEntry(keyPtr4, result, value);
-    ASSERT(result->getVersionStamp().getMemberId() == 3, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 6, "an exception");
-    ASSERT(DeltaEx::fromDeltaCount == 1, " Delta count should have been 1 ");
-
-    // Delta update, Not allowed as delta based on a different host version
-    // different
-    auto versionTag12pp = std::make_shared<VersionTag>(7, 6, 7, host13, 
host12);
-    err = entries->put(keyPtr4, valPtr1, me, oldValue, -1, 0, versionTag12plus,
-                       isUpdate, &datainput);
-    ASSERT(err == GF_INVALID_DELTA, "an exception");
-    entries->getEntry(keyPtr4, result, value);
-    ASSERT(result->getVersionStamp().getMemberId() == 3, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 6, "an exception");
-    ASSERT(DeltaEx::fromDeltaCount == 1, " Delta count should have been 1 ");
-
-    auto valPtr2 = std::make_shared<DeltaEx>();
-    valPtr2->setDelta(true);
-    DataOutput doutput1;
-    doutput1.writeInt(1);
-    const auto buffer1 = doutput1.getBuffer();
-    DataInput datainput1(buffer1, doutput1.getBufferLength());
-    DeltaEx::fromDeltaCount = 0;
-    // Delta update,  allowed as delta based on correct host version different
-    auto versionTag12pp1 =
-        std::make_shared<VersionTag>(7, 6, 7, host14, host13);
-    err = entries->put(keyPtr4, valPtr2, me, oldValue, -1, 0, versionTag12pp1,
-                       isUpdate, &datainput1);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr4, result, value);
-    ASSERT(result->getVersionStamp().getMemberId() == 4, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 7, "an exception");
-    ASSERT(DeltaEx::fromDeltaCount == 1, " Delta count should have been 1 ");
-
-    /******* Test disk version tags*****************/
-    auto versiondiskTag17 =
-        std::make_shared<DiskVersionTag>(5, 6, 7, disk17, 0);
-    auto versiondiskTag18 =
-        std::make_shared<DiskVersionTag>(5, 6, 7, disk18, 0);
-    auto versiondiskTag27 =
-        std::make_shared<DiskVersionTag>(5, 6, 7, disk27, 0);
-    auto keydiskPtr = CacheableKey::create("keydisk1");
-    err =
-        entries->put(keydiskPtr, ccstr, me, oldValue, -1, 0, versiondiskTag17);
-    err =
-        entries->put(keydiskPtr, ccstr1, me, oldValue, -1, 0, 
versiondiskTag27);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keydiskPtr, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 500, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == disk27, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-
-    err =
-        entries->put(keydiskPtr, ccstr, me, oldValue, -1, 0, versiondiskTag18);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    entries->getEntry(keydiskPtr, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 500, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == disk27, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-
-    /********* Test with vm view ids ****************/
-    auto versionvmviewTag5 =
-        std::make_shared<VersionTag>(5, 6, 7, hostVmview5, 0);
-    auto versionvmviewTag6 =
-        std::make_shared<VersionTag>(5, 6, 7, hostVmview6, 0);
-    auto versionvmviewTag7 =
-        std::make_shared<VersionTag>(5, 6, 7, hostVmview7, 0);
-    auto keyvmviewPtr = CacheableKey::create("keyvm1");
-    err = entries->put(keyvmviewPtr, ccstr, me, oldValue, -1, 0,
-                       versionvmviewTag5);
-
-    err = entries->put(keyvmviewPtr, ccstr1, me, oldValue, -1, 0,
-                       versionvmviewTag7);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyvmviewPtr, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 500, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == hostVmview7,
-           "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-
-    err = entries->put(keyvmviewPtr, ccstr, me, oldValue, -1, 0,
-                       versionvmviewTag6);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    entries->getEntry(keyvmviewPtr, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 500, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == hostVmview7,
-           "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-
-    sprintf(log, "Put test complete. %d", err);
-    LOG(log);
-
-    delete entries;
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, StepThree_TestCreate)
-  {
-    auto lregPtr = std::dynamic_pointer_cast<LocalRegion>(regPtr);
-    auto ccstr = createCacheable("100");
-    auto ccstr1 = createCacheable("500");
-    auto entryFactory = EntryFactory::singleton;
-    entryFactory->setConcurrencyChecksEnabled(true);
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, true, lregPtr.get());
-    entries->open();
-    auto keyPtr4 = CacheableKey::create("key4");
-    ASSERT(keyPtr4 != nullptr, "expected keyPtr non-nullptr");
-    MapEntryImplPtr me;
-    MapEntryImplPtr result;
-    CacheablePtr value;
-
-    /*new VersionTag(int32_t entryVersion,
-        int16_t regionVersionHighBytes, int32_t regionVersionLowBytes,
-        uint16_t internalMemId, uint16_t previousMemId) */
-    auto versionTag1 = std::make_shared<VersionTag>(5, 6, 7, host1, 0);
-
-    auto versionTag12 = std::make_shared<VersionTag>(5, 6, 7, host12, 0);
-
-    auto versionTag13 = std::make_shared<VersionTag>(5, 6, 7, host13, 0);
-    auto versionTag14 = std::make_shared<VersionTag>(5, 6, 7, host14, 0);
-    auto versionTag15 = std::make_shared<VersionTag>(5, 6, 7, host15, 0);
-    auto versionTag16 = std::make_shared<VersionTag>(5, 6, 7, host16, 0);
-    auto versionTag17 = std::make_shared<VersionTag>(5, 6, 7, host17, 0);
-
-    CacheablePtr oldValue;
-    entries->create(keyPtr4, ccstr, me, oldValue, -1, 0, versionTag1);
-    entries->getEntry(keyPtr4, result, value);
-    ASSERT(me->getVersionStamp().getEntryVersion() == 5, "an exception");
-    ASSERT(me->getVersionStamp().getMemberId() == 1, "an exception");
-
-    char log[256];
-
-    auto keyPtr = CacheableKey::create("Key");
-    auto err =
-        entries->create(keyPtr, nullptr, me, oldValue, -1, 0, versionTag12);
-    ASSERT(err == GF_NOERR, "an exception");
-
-    err = entries->create(keyPtr, nullptr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->create(keyPtr, nullptr, me, oldValue, -1, 0, versionTag13);
-    ASSERT(err == GF_NOERR, "an exception");
-
-    err = entries->create(keyPtr, nullptr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->create(keyPtr, nullptr, me, oldValue, -1, 0, versionTag14);
-    ASSERT(err == GF_NOERR, "an exception");
-
-    err = entries->create(keyPtr, nullptr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->create(keyPtr, nullptr, me, oldValue, -1, 0, versionTag15);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->create(keyPtr, nullptr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->create(keyPtr, nullptr, me, oldValue, -1, 0, versionTag16);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->create(keyPtr, ccstr1, me, oldValue, -1, 0, versionTag17);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(result->getVersionStamp().getMemberId() == 7, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-
-    auto versionTag18 = std::make_shared<VersionTag>(0xffffaa, 6, 7, host1, 0);
-
-    auto keyPtr2 = CacheableKey::create("Key2");
-    err = entries->create(keyPtr2, nullptr, me, oldValue, -1, 0, versionTag18);
-    ASSERT(err == GF_NOERR, "an exception");
-
-    // version rollover, this will be applied
-    err = entries->create(keyPtr2, nullptr, me, oldValue, -1, 0, versionTag12);
-    ASSERT(err == GF_NOERR, "an exception");
-
-    // Null version tag, this will be applied
-    VersionTagPtr versionTag19;
-    err = entries->create(keyPtr2, ccstr, me, oldValue, -1, 0, versionTag19);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr2, result, value);
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-
-    // inserts a null tag
-    auto keyPtr3 = CacheableKey::create("Key3");
-    err = entries->create(keyPtr3, nullptr, me, oldValue, -1, 0, versionTag19);
-    ASSERT(err == GF_NOERR, "an exception");
-
-    // inserts an entry with version stamp, the previous entry is without
-    // version
-    // stamp,
-    // should be allowed.
-    err = entries->create(keyPtr3, ccstr1, me, oldValue, -1, 0, versionTag12);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr3, result, value);
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-
-    sprintf(log, "Create test complete. %d", err);
-    LOG(log);
-
-    delete entries;
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepEight_TestLRUEntries)
-  {
-    auto lregPtr = std::dynamic_pointer_cast<LocalRegion>(regPtr);
-    auto ccstr = createCacheable("100");
-    auto ccstr1 = createCacheable("500");
-    auto entryFactory = LRUExpEntryFactory::singleton;
-    entryFactory->setConcurrencyChecksEnabled(true);
-    EntriesMap* entries = new LRUEntriesMap(entryFactory, lregPtr.get(),
-                                            LRUAction::DESTROY, 50000, true);
-    entries->open();
-    auto keyPtr4 = CacheableKey::create("key4");
-    auto keyPtr5 = CacheableKey::create("key5");
-    auto keyPtr6 = CacheableKey::create("key6");
-    MapEntryImplPtr me;
-    MapEntryImplPtr result;
-    CacheablePtr value;
-    char log[256];
-
-    auto versionTag1 = std::make_shared<VersionTag>(5, 6, 7, host1, 0);
-
-    auto versionTag12 = std::make_shared<VersionTag>(5, 6, 7, host12, 0);
-
-    entries->put(keyPtr4, ccstr, me, value, -1, 0, versionTag1);
-
-    auto err = entries->remove(keyPtr4, value, me, -1, versionTag12, false);
-    ASSERT(err == GF_NOERR, "an exception");
-    bool isTombstone;
-    err = entries->isTombstone(keyPtr4, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-
-    entries->put(keyPtr5, ccstr, me, value, -1, 0, versionTag1);
-
-    err = entries->invalidate(keyPtr5, me, value, versionTag12);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr5, result, value);
-    ASSERT(CacheableToken::isInvalid(value) == true, "an exception");
-
-    entries->put(keyPtr6, ccstr, me, value, -1, 0, versionTag1);
-
-    ASSERT(entries->get(keyPtr4, value, result) == false, "an exception");
-    ASSERT(entries->get(keyPtr6, value, result) == true, "an exception");
-
-    sprintf(log, "LRUentriesMap test complete. %d", err);
-    LOG(log);
-
-    delete entries;
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepFive_TestTombstoneExpiry)
-  {
-    auto lregPtr = std::dynamic_pointer_cast<LocalRegion>(regPtr);
-    auto ccstr = createCacheable("100");
-    auto ccstr1 = createCacheable("500");
-    auto entryFactory = EntryFactory::singleton;
-    entryFactory->setConcurrencyChecksEnabled(true);
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, true, lregPtr.get());
-    entries->open();
-    auto keyPtr4 = CacheableKey::create("key4");
-    auto keyPtr5 = CacheableKey::create("key5");
-    auto keyPtr6 = CacheableKey::create("key6");
-    MapEntryImplPtr me;
-    MapEntryImplPtr result;
-    CacheablePtr value;
-    char log[256];
-
-    auto versionTag1 = std::make_shared<VersionTag>(5, 6, 7, host1, 0);
-
-    auto versionTag12 = std::make_shared<VersionTag>(5, 6, 7, host12, 0);
-
-    entries->put(keyPtr4, ccstr, me, value, -1, 0, versionTag1);
-
-    auto err = entries->remove(keyPtr4, value, me, -1, versionTag12, false);
-    ASSERT(err == GF_NOERR, "an exception");
-    bool isTombstone;
-    err = entries->isTombstone(keyPtr4, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-
-    entries->put(keyPtr5, ccstr, me, value, -1, 0, versionTag1);
-
-    err = entries->remove(keyPtr5, value, me, -1, versionTag12, false);
-    ASSERT(err == GF_NOERR, "an exception");
-    err = entries->isTombstone(keyPtr5, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-
-    entries->put(keyPtr6, ccstr, me, value, -1, 0, versionTag1);
-    auto tombstone_count =
-        lregPtr->getCacheImpl()->m_cacheStats->getTombstoneCount();
-    auto tombstone_size =
-        lregPtr->getCacheImpl()->m_cacheStats->getTombstoneSize();
-
-    sprintf(log,
-            "Before expiry, Tombstone size: %" PRId64 " Tombstone count: %d",
-            tombstone_size, tombstone_count);
-    LOG(log);
-    ASSERT(tombstone_count > 0, "Tombstone count should be equal to 2");
-    ASSERT(tombstone_size > 160,
-           "Tombstone size should be greater than 160 bytes. 160 is a approx "
-           "figure for tombstone overhead");
-
-    ACE_OS::sleep(8);
-
-    err = entries->isTombstone(keyPtr5, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    ASSERT(entries->get(keyPtr5, value, result) == false, "an exception");
-    err = entries->isTombstone(keyPtr4, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    ASSERT(entries->get(keyPtr4, value, result) == false, "an exception");
-
-    auto tombstone_count_after =
-        lregPtr->getCacheImpl()->m_cacheStats->getTombstoneCount();
-    auto tombstone_size_after =
-        lregPtr->getCacheImpl()->m_cacheStats->getTombstoneSize();
-
-    sprintf(log,
-            "After expiry, Tombstone size: %" PRId64 " Tombstone count: %d",
-            tombstone_size_after, tombstone_count_after);
-    LOG(log);
-
-    ASSERT((tombstone_count - 2) == tombstone_count_after,
-           "Tombstone count does not match");
-    ASSERT((tombstone_size - 160) > tombstone_size_after,
-           "Tombstone size does not match");
-
-    sprintf(log, "Tombstone expiry test complete. %d", err);
-    LOG(log);
-
-    delete entries;
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepSix_TestInvalidate)
-  {
-    auto lregPtr = std::dynamic_pointer_cast<LocalRegion>(regPtr);
-    auto ccstr = createCacheable("100");
-    auto ccstr1 = createCacheable("500");
-    auto entryFactory = EntryFactory::singleton;
-    entryFactory->setConcurrencyChecksEnabled(true);
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, true, lregPtr.get());
-    entries->open();
-    CacheableKeyPtr keyPtr = CacheableKey::create("key1");
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    MapEntryImplPtr me;
-    MapEntryImplPtr result;
-    CacheablePtr value;
-
-    auto versionTag1 = std::make_shared<VersionTag>(5, 6, 7, host1, 0);
-
-    auto versionTag12 = std::make_shared<VersionTag>(5, 6, 7, host12, 0);
-
-    auto versionTag13 = std::make_shared<VersionTag>(5, 6, 7, host13, 0);
-    auto versionTag14 = std::make_shared<VersionTag>(5, 6, 7, host14, 0);
-    auto versionTag15 = std::make_shared<VersionTag>(5, 6, 7, host15, 0);
-    auto versionTag16 = std::make_shared<VersionTag>(5, 6, 7, host16, 0);
-    auto versionTag17 = std::make_shared<VersionTag>(5, 6, 7, host17, 0);
-    auto versionTag22 = std::make_shared<VersionTag>(9, 10, 10, host12, 0);
-
-    CacheablePtr oldValue;
-    entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag1);
-    char log[256];
-
-    auto err = entries->invalidate(keyPtr, me, oldValue, versionTag12);
-
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(CacheableToken::isInvalid(value) == true, "an exception");
-
-    err = entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(CacheableToken::isInvalid(value) == true, "an exception");
-
-    err = entries->put(keyPtr, ccstr1, me, oldValue, -1, 0, versionTag13);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(CacheableToken::isInvalid(value) != true, "an exception");
-
-    err = entries->invalidate(keyPtr, me, oldValue, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(CacheableToken::isInvalid(value) != true, "an exception");
-
-    err = entries->invalidate(keyPtr, me, oldValue, versionTag14);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(CacheableToken::isInvalid(value) == true, "an exception");
-
-    err = entries->invalidate(keyPtr, me, oldValue, versionTag17);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(CacheableToken::isInvalid(value) == true, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 7, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-
-    err = entries->invalidate(keyPtr, me, oldValue, versionTag22);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(CacheableToken::isInvalid(value) == true, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 9, "an exception");
-
-    auto versionTag18 = std::make_shared<VersionTag>(0xffffaa, 6, 7, host1, 0);
-
-    // version rollover, this will not be applied
-    err = entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag18);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(CacheableToken::isInvalid(value) == true, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 9, "an exception");
-
-    auto keyPtr2 = CacheableKey::create("Key2");
-    err = entries->put(keyPtr2, ccstr, me, oldValue, -1, 0, versionTag18);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr2, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 100, "an exception");
-    ASSERT(me->getVersionStamp().getMemberId() == 1, "an exception");
-
-    // version rollover, this will be applied
-    err = entries->invalidate(keyPtr2, me, oldValue, versionTag22);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr2, result, value);
-    ASSERT(CacheableToken::isInvalid(value) == true, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 9, "an exception");
-
-    // Null version tag, this will be applied
-    VersionTagPtr versionTag19;
-    err = entries->put(keyPtr2, ccstr, me, oldValue, -1, 0, versionTag19);
-    entries->getEntry(keyPtr2, result, value);
-    ASSERT(CacheableToken::isInvalid(value) != true, "an exception");
-    ASSERT(atoi(value->toString()->asChar()) == 100, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 9, "an exception");
-
-    // inserts a null tag
-    auto keyPtr3 = CacheableKey::create("Key3");
-    err = entries->put(keyPtr3, ccstr1, me, oldValue, -1, 0, versionTag19);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr3, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 500, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 0, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 0, "an exception");
-
-    // removes an entry with version tag, the previous entry is without version
-    // stamp,
-    // should be allowed.
-    err = entries->invalidate(keyPtr3, me, oldValue, versionTag12);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr3, result, value);
-    ASSERT(CacheableToken::isInvalid(value) == true, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-    delete entries;
-    sprintf(log, "Invalidate test complete. %d", err);
-    LOG(log);
-  }
-END_TASK_DEFINITION
-
-DUNIT_TASK_DEFINITION(CLIENT1, StepSeven_TestGetsAfterRemove)
-  {
-    auto lregPtr = std::dynamic_pointer_cast<LocalRegion>(regPtr);
-    auto ccstr = createCacheable("100");
-    auto ccstr1 = createCacheable("500");
-    auto entryFactory = EntryFactory::singleton;
-    entryFactory->setConcurrencyChecksEnabled(true);
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, true, lregPtr.get());
-    entries->open();
-    auto keyPtr4 = CacheableKey::create("key4");
-    auto keyPtr5 = CacheableKey::create("key5");
-    auto keyPtr6 = CacheableKey::create("key6");
-    MapEntryImplPtr me;
-    MapEntryImplPtr result;
-    CacheablePtr value;
-    char log[256];
-
-    auto versionTag1 = std::make_shared<VersionTag>(5, 6, 7, host1, 0);
-
-    auto versionTag12 = std::make_shared<VersionTag>(5, 6, 7, host12, 0);
-
-    auto versionTag22 = std::make_shared<VersionTag>(6, 6, 7, host12, 0);
-
-    entries->put(keyPtr4, ccstr, me, value, -1, 0, versionTag1);
-
-    auto err = entries->remove(keyPtr4, value, me, -1, versionTag12, false);
-    ASSERT(err == GF_NOERR, "an exception");
-    bool isTombstone;
-    err = entries->isTombstone(keyPtr4, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-
-    entries->put(keyPtr5, ccstr, me, value, -1, 0, versionTag1);
-
-    err = entries->remove(keyPtr5, value, me, -1, versionTag12, false);
-    ASSERT(err == GF_NOERR, "an exception");
-    err = entries->isTombstone(keyPtr5, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-
-    entries->put(keyPtr6, ccstr, me, value, -1, 0, versionTag1);
-
-    ASSERT(entries->containsKey(keyPtr6) == true, "an exception");
-    ASSERT(entries->containsKey(keyPtr5) == false, "an exception");
-    ASSERT(entries->containsKey(keyPtr4) == false, "an exception");
-    ASSERT(entries->get(keyPtr4, value, result) == false, "an exception");
-    ASSERT(entries->get(keyPtr5, value, result) == false, "an exception");
-    ASSERT(entries->get(keyPtr6, value, result) == true, "an exception");
-
-    VectorOfCacheable values;
-    entries->values(values);
-    ASSERT(values.size() == 1, "an exception");
-
-    VectorOfCacheableKey keys;
-    entries->keys(keys);
-    ASSERT(keys.size() == 1, "an exception");
-
-    VectorOfRegionEntry regionEntries;
-    entries->entries(regionEntries);
-    ASSERT(regionEntries.size() == 1, "an exception");
-
-    entries->put(keyPtr5, ccstr, me, value, -1, 0, versionTag22);
-
-    ASSERT(entries->containsKey(keyPtr6) == true, "an exception");
-    ASSERT(entries->containsKey(keyPtr5) == true, "an exception");
-    ASSERT(entries->containsKey(keyPtr4) == false, "an exception");
-    ASSERT(entries->get(keyPtr4, value, result) == false, "an exception");
-    ASSERT(entries->get(keyPtr5, value, result) == true, "an exception");
-    ASSERT(entries->get(keyPtr6, value, result) == true, "an exception");
-
-    entries->values(values);
-    ASSERT(values.size() == 2, "an exception");
-
-    entries->keys(keys);
-    ASSERT(keys.size() == 2, "an exception");
-
-    entries->entries(regionEntries);
-    ASSERT(regionEntries.size() == 2, "an exception");
-
-    sprintf(log, "TestGetsAfterRemove test complete. %d", err);
-    LOG(log);
-
-    delete entries;
-  }
-END_TASK_DEFINITION
-DUNIT_TASK_DEFINITION(CLIENT1, StepFour_TestRemove)
-  {
-    auto lregPtr = std::dynamic_pointer_cast<LocalRegion>(regPtr);
-    auto ccstr = createCacheable("100");
-    auto ccstr1 = createCacheable("500");
-    auto entryFactory = EntryFactory::singleton;
-    entryFactory->setConcurrencyChecksEnabled(true);
-    EntriesMap* entries =
-        new ConcurrentEntriesMap(entryFactory, true, lregPtr.get());
-    entries->open();
-    auto keyPtr = CacheableKey::create("key1");
-    ASSERT(keyPtr != nullptr, "expected keyPtr non-nullptr");
-    MapEntryImplPtr me;
-    MapEntryImplPtr result;
-    CacheablePtr value;
-
-    auto versionTag1 = std::make_shared<VersionTag>(5, 6, 7, host1, 0);
-
-    auto versionTag12 = std::make_shared<VersionTag>(5, 6, 7, host12, 0);
-
-    auto versionTag13 = std::make_shared<VersionTag>(5, 6, 7, host13, 0);
-    auto versionTag14 = std::make_shared<VersionTag>(5, 6, 7, host14, 0);
-    auto versionTag15 = std::make_shared<VersionTag>(5, 6, 7, host15, 0);
-    auto versionTag16 = std::make_shared<VersionTag>(5, 6, 7, host16, 0);
-    auto versionTag17 = std::make_shared<VersionTag>(5, 6, 7, host17, 0);
-    auto versionTag22 = std::make_shared<VersionTag>(9, 10, 10, host12, 0);
-
-    CacheablePtr oldValue;
-    entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag1);
-    char log[256];
-
-    auto err = entries->remove(keyPtr, oldValue, me, -1, versionTag12, false);
-
-    ASSERT(err == GF_NOERR, "an exception");
-    bool isTombstone;
-    err = entries->isTombstone(keyPtr, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr, result, value);
-    ASSERT(isTombstone == true, "an exception");
-
-    err = entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    err = entries->isTombstone(keyPtr, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-
-    auto tombstone_count =
-        lregPtr->getCacheImpl()->m_cacheStats->getTombstoneCount();
-    auto tombstone_size =
-        lregPtr->getCacheImpl()->m_cacheStats->getTombstoneSize();
-
-    sprintf(log,
-            "After tombstone creation, Tombstone size: %" PRId64
-            " Tombstone count: %d",
-            tombstone_size, tombstone_count);
-    LOG(log);
-    ASSERT(tombstone_count == 1, "Tombstone count should be equal to 1");
-    ASSERT(tombstone_size > 70,
-           "Tombstone size should be greater than 70 bytes. 70 is an approx "
-           "figure for tombstone overhead");
-
-    err = entries->put(keyPtr, ccstr1, me, oldValue, -1, 0, versionTag13);
-    ASSERT(err == GF_NOERR, "an exception");
-    err = entries->isTombstone(keyPtr, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-
-    tombstone_count =
-        lregPtr->getCacheImpl()->m_cacheStats->getTombstoneCount();
-    tombstone_size = lregPtr->getCacheImpl()->m_cacheStats->getTombstoneSize();
-
-    sprintf(log,
-            "After converting tombstone into an entry, Tombstone size: %" 
PRId64
-            " Tombstone count: %d",
-            tombstone_size, tombstone_count);
-    LOG(log);
-    ASSERT(tombstone_count == 0, "Tombstone count should be equal to 0");
-    ASSERT(tombstone_size == 0, "Tombstone size should be 0");
-
-    err = entries->remove(keyPtr, oldValue, me, -1, versionTag1, false);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    err = entries->isTombstone(keyPtr, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    ASSERT(entries->get(keyPtr, value, result) == true, "an exception");
-
-    err = entries->remove(keyPtr, oldValue, me, -1, versionTag14, false);
-    ASSERT(err == GF_NOERR, "an exception");
-    err = entries->isTombstone(keyPtr, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 4, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-    ASSERT(entries->get(keyPtr, value, result) == false, "an exception");
-
-    err = entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->put(keyPtr, ccstr1, me, oldValue, -1, 0, versionTag15);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag1);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->remove(keyPtr, oldValue, me, -1, versionTag16, false);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-
-    err = entries->remove(keyPtr, oldValue, me, -1, versionTag17, false);
-    ASSERT(err == GF_CACHE_ENTRY_NOT_FOUND, "an exception");
-    err = entries->isTombstone(keyPtr, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 7, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-    ASSERT(entries->get(keyPtr, value, result) == false, "an exception");
-
-    err = entries->remove(keyPtr, oldValue, me, -1, versionTag22, false);
-    ASSERT(err == GF_CACHE_ENTRY_NOT_FOUND, "an exception");
-    err = entries->isTombstone(keyPtr, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 9, "an exception");
-    ASSERT(entries->get(keyPtr, value, result) == false, "an exception");
-
-    auto versionTag18 = std::make_shared<VersionTag>(0xffffaa, 6, 7, host1, 0);
-
-    // version rollover, this will not be applied
-    err = entries->put(keyPtr, ccstr, me, oldValue, -1, 0, versionTag18);
-    ASSERT(err == GF_CACHE_CONCURRENT_MODIFICATION_EXCEPTION, "an exception");
-    err = entries->isTombstone(keyPtr, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 9, "an exception");
-    ASSERT(entries->get(keyPtr, value, result) == false, "an exception");
-
-    auto keyPtr2 = CacheableKey::create("Key2");
-    err = entries->put(keyPtr2, ccstr, me, oldValue, -1, 0, versionTag18);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr2, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 100, "an exception");
-    ASSERT(me->getVersionStamp().getMemberId() == 1, "an exception");
-
-    // version rollover, this will be applied
-    err = entries->remove(keyPtr2, oldValue, me, -1, versionTag22, false);
-    ASSERT(err == GF_NOERR, "an exception");
-    err = entries->isTombstone(keyPtr2, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 9, "an exception");
-    ASSERT(entries->get(keyPtr2, value, result) == false, "an exception");
-
-    // Null version tag, this will be applied
-    VersionTagPtr versionTag19;
-    err = entries->put(keyPtr2, ccstr, me, oldValue, -1, 0, versionTag19);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr2, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 100, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 9, "an exception");
-
-    // inserts a null tag
-    auto keyPtr3 = CacheableKey::create("Key3");
-    err = entries->put(keyPtr3, ccstr1, me, oldValue, -1, 0, versionTag19);
-    ASSERT(err == GF_NOERR, "an exception");
-    entries->getEntry(keyPtr3, result, value);
-    ASSERT(atoi(value->toString()->asChar()) == 500, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 0, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 0, "an exception");
-
-    // removes an entry with version tag, the previous entry is without version
-    // stamp,
-    // should be allowed.
-    err = entries->remove(keyPtr3, oldValue, me, 0, versionTag12, false);
-    ASSERT(err == GF_NOERR, "an exception");
-    err = entries->isTombstone(keyPtr3, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    ASSERT(result->getVersionStamp().getMemberId() == 2, "an exception");
-    ASSERT(result->getVersionStamp().getEntryVersion() == 5, "an exception");
-    ASSERT(entries->get(keyPtr3, value, result) == false, "an exception");
-
-    auto keyPtrR2 = CacheableKey::create("keyPtrR2");
-    auto keyPtrR3 = CacheableKey::create("keyPtrR3");
-    auto keyPtrR4 = CacheableKey::create("keyPtrR4");
-    auto keyPtrR5 = CacheableKey::create("keyPtrR5");
-    auto keyPtrR6 = CacheableKey::create("keyPtrR6");
-
-    auto keyPtrR21 = CacheableKey::create("keyPtrR21");
-    auto keyPtrR31 = CacheableKey::create("keyPtrR31");
-    auto keyPtrR41 = CacheableKey::create("keyPtrR41");
-    auto keyPtrR51 = CacheableKey::create("keyPtrR51");
-    auto keyPtrR61 = CacheableKey::create("keyPtrR61");
-
-    auto versionTag23 = std::make_shared<VersionTag>(9, 10, 10, host13, 0);
-    auto versionTag24 = std::make_shared<VersionTag>(9, 10, 10, host14, 0);
-    auto versionTag25 = std::make_shared<VersionTag>(9, 10, 10, host15, 0);
-    auto versionTag26 = std::make_shared<VersionTag>(9, 10, 10, host16, 0);
-
-    sprintf(log, "Test reaping of tombstones");
-    LOG(log);
-
-    // add few entries with null version tags
-    err = entries->put(keyPtrR2, ccstr1, me, oldValue, -1, 0, versionTag19);
-    err = entries->put(keyPtrR3, ccstr1, me, oldValue, -1, 0, versionTag19);
-    err = entries->put(keyPtrR4, ccstr1, me, oldValue, -1, 0, versionTag19);
-    err = entries->put(keyPtrR5, ccstr1, me, oldValue, -1, 0, versionTag19);
-    err = entries->put(keyPtrR21, ccstr1, me, oldValue, -1, 0, versionTag19);
-    err = entries->put(keyPtrR31, ccstr1, me, oldValue, -1, 0, versionTag19);
-    err = entries->put(keyPtrR41, ccstr1, me, oldValue, -1, 0, versionTag19);
-    err = entries->put(keyPtrR51, ccstr1, me, oldValue, -1, 0, versionTag19);
-    err = entries->put(keyPtrR61, ccstr1, me, oldValue, -1, 0, versionTag19);
-
-    // remove those entries using non null version tags
-    err = entries->remove(keyPtrR2, oldValue, me, -1, versionTag12, false);
-    err = entries->remove(keyPtrR3, oldValue, me, -1, versionTag13, false);
-    err = entries->remove(keyPtrR4, oldValue, me, -1, versionTag14, false);
-    err = entries->remove(keyPtrR5, oldValue, me, -1, versionTag15, false);
-    err = entries->remove(keyPtrR21, oldValue, me, -1, versionTag22, false);
-    err = entries->remove(keyPtrR31, oldValue, me, -1, versionTag23, false);
-    err = entries->remove(keyPtrR41, oldValue, me, -1, versionTag24, false);
-    err = entries->remove(keyPtrR51, oldValue, me, -1, versionTag25, false);
-    err = entries->remove(keyPtrR61, oldValue, me, -1, versionTag26, false);
-
-    // test if all of them have been converted into tombstones.
-    err = entries->isTombstone(keyPtrR2, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    err = entries->isTombstone(keyPtrR3, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    err = entries->isTombstone(keyPtrR4, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    err = entries->isTombstone(keyPtrR5, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    err = entries->isTombstone(keyPtrR21, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    err = entries->isTombstone(keyPtrR31, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    err = entries->isTombstone(keyPtrR41, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    err = entries->isTombstone(keyPtrR51, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-
-    // generate dummy gc versions
-    std::map<uint16_t, int64_t> gcVersions;
-    int64_t temp = 3;
-    temp = temp << 32;
-    gcVersions[1] = temp;
-    gcVersions[2] = temp;
-    temp = 11;
-    temp = temp << 32;
-    gcVersions[3] = temp;
-    temp = 9;
-    temp = temp << 32;
-    gcVersions[4] = temp;
-    temp = 10;
-    temp = temp << 32;
-    gcVersions[5] = temp;
-
-    // reap entries based on gc versions
-    entries->reapTombstones(gcVersions);
-
-    // make sure entries are reaped
-    err = entries->isTombstone(keyPtrR2, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    ASSERT(entries->get(keyPtrR2, value, result) == false, "an exception");
-    err = entries->isTombstone(keyPtrR3, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    ASSERT(entries->get(keyPtrR3, value, result) == false, "an exception");
-    err = entries->isTombstone(keyPtrR4, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    ASSERT(entries->get(keyPtrR4, value, result) == false, "an exception");
-
-    err = entries->isTombstone(keyPtrR5, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    ASSERT(entries->get(keyPtrR5, value, result) == false, "an exception");
-
-    err = entries->isTombstone(keyPtrR21, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    ASSERT(entries->get(keyPtrR21, value, result) == false, "an exception");
-
-    err = entries->isTombstone(keyPtrR31, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    ASSERT(entries->get(keyPtrR31, value, result) == false, "an exception");
-
-    err = entries->isTombstone(keyPtrR41, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    ASSERT(entries->get(keyPtrR41, value, result) == false, "an exception");
-
-    err = entries->isTombstone(keyPtrR51, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    ASSERT(entries->get(keyPtrR51, value, result) == false, "an exception");
-
-    sprintf(log, "Remove test complete. %d", err);
-    LOG(log);
-    // reap using removedKeys API
-    auto keyPtrR71 = CacheableKey::create("keyPtrR71");
-    auto removedKeys = CacheableHashSet::create();
-    removedKeys->insert(keyPtrR3);
-    removedKeys->insert(keyPtrR71);
-    removedKeys->insert(keyPtrR2);
-    removedKeys->insert(keyPtrR41);
-
-    // reap entries based keys
-    entries->reapTombstones(removedKeys);
-
-    // make sure entries are reaped
-    err = entries->isTombstone(keyPtrR2, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    err = entries->isTombstone(keyPtrR3, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    err = entries->isTombstone(keyPtrR4, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    err = entries->isTombstone(keyPtrR5, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    err = entries->isTombstone(keyPtrR21, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    err = entries->isTombstone(keyPtrR31, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    err = entries->isTombstone(keyPtrR41, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == false, "an exception");
-    err = entries->isTombstone(keyPtrR51, result, isTombstone);
-    ASSERT(err == GF_NOERR, "an exception");
-    ASSERT(isTombstone == true, "an exception");
-    delete entries;
-  }
-END_TASK_DEFINITION
-void runTask() {
-  CALL_TASK(CREATECLIENT);
-  CALL_TASK(StepOne_AddHosts);
-  CALL_TASK(StepTwo_TestPut);
-  CALL_TASK(StepThree_TestCreate);
-  CALL_TASK(StepFour_TestRemove);
-  CALL_TASK(StepFive_TestTombstoneExpiry);
-  CALL_TASK(StepSix_TestInvalidate);
-  CALL_TASK(StepSeven_TestGetsAfterRemove);
-  CALL_TASK(StepEight_TestLRUEntries);
-  CALL_TASK(CloseCache1);
-}
-
-DUNIT_MAIN
-  { runTask(); }
-END_MAIN
-
-#endif

Reply via email to