resetForTesting static method
Clears all tracking state between tests.
Bumps _bufferGeneration, so a flush still awaiting the bridge cannot
reinsert its batch into the buffer of the next test.
Implementation
@visibleForTesting
static Future<void> resetForTesting() async {
_stopContinuousTracking();
_isTracking = false;
_isContinuousTracking = false;
_methodChannel = MethodChannelKalapaBehaviorScoreFlutter();
await _eventsLock.synchronized(() {
_bufferGeneration++;
_events.clear();
});
}