refactor persistence specs