unit test: Check that the cache works