pm.setSavepoint("after");
pm.setSavepoint("after2");
if (rollback)
pm.rollbackToSavepoint("test2");
else
pm.releaseSavepoint("test2");
assertFlags("before", 0, RELEASED | ROLLBACK);
assertFlags("before2", 0, RELEASED | ROLLBACK);
assertFlags("test", 0, RELEASED | ROLLBACK);
assertFlags("after", RELEASED, USER);