Add test for savepoints