Write tests for persistance