Add test which checks if prepare is being rerun on client restart