$window and $cacheFactory mocks