Add unittests for cache and store and forward