Functions for testing
@visibleForTesting Map<int, SMQueueEntry> getUnackedStanzas() => _unackedStanzas;