Persistence unit tests

Fixes #28. At the moment the mongo unit tests pass as expected. The majority of the mock store unit tests pass but unfortunately mock is not prioritized to be fixed so we won't be able to fix some of its issues anytime soon.