Added tests for persistence.