Make PreferencesFilePersisterTests.testBeginSave check that clear() was called