refactoring memcache tests