Maybe this store and restore logic can be part of our test infrastructure.