Add a new test for the view counter to verify saves.

Refactor the tests so we can reuse the DictKeyValueStore.