save method
Saves a value associated with the given key.
The value is a serialized string representation of the state.
Implementations should handle overwriting existing values.
Throws an exception if the save operation fails.
Implementation
@override
Future<void> save(String key, String value) async {
saveCount++;
_savedKeys.add(key);
if (saveDelay != null) await Future<void>.delayed(saveDelay!);
if (saveError != null) throw saveError!;
_data[key] = value;
}