Did that happen when running an unit test extending BaseCacheStoreTest? that one mocks the cache that is passed in so a null is possible (you'd have to enhance the BaseCacheStoreTest to mock the registry as well).
In real situations though the registry shouldn't be null (e.g. when running a test extending BaseCacheStoreFunctionalTest).