Add test for persistence