Add tests for cache