anchor.diff:            .where((event) =>
                 event.parentEvent != null && event is! XmlEndElementEvent)
             .toList();
  -      final expected =
  -          const XmlNodeCodec().encode(document.rootElement.children);
  -      expect(actual, expected);
  +      if (document.children.isEmpty) {
  +        expect(actual, []);
  +      } else {
  +        final expected =
  +            const XmlNodeCodec().encode(document.rootElement.children);
  +        expect(actual, expected);
  +      }
       });
     });
     group('normalizeEvents', () {
  
positive.code:                 XmlDocument document, int Function() splitter)
              callback) {
        group(title, () {
          final string = XmlDocument.parse(input).toXmlString(pretty: true);
          for (var i = string.length; i > 0; i ~/= 2) {
            test('chunks sized $i', () {
              final events = parseEvents(string).toList(growable: false);
  
negative.code: import 'dart:convert';
  import 'dart:math' show min, Random;
  
  import 'package:meta/meta.dart';
  import 'package:test/test.dart';
  import 'package:xml/xml.dart';
  import 'package:xml/xml_events.dart';
  