Add tests for persistence.