Unit tests for the persistence layer.

Well, kinda more like functional tests. Tests. We can agree on that
word, I hope.