Add tests for the cache decorator