anchor.diff:      Map<String, BuilderDefinition> expected) {
     expect(actual.keys, unorderedEquals(expected.keys));
     for (var p in actual.keys) {
  -    expect(actual[p], new _BuilderDefinitionMatcher(expected[p]));
  +    expect(actual[p], _matchesBuilderDefinition(expected[p]));
     }
   }
   
  
positive.code:     Map<String, GlobalBuilderConfig> expected) {
    expect(actual.keys, unorderedEquals(expected.keys));
    for (var p in actual.keys) {
      expect(actual[p], new _GlobalBuilderConfigMatcher(expected[p]));
    }
  }
  
  class _BuilderDefinitionMatcher extends Matcher {
    final BuilderDefinition _expected;
    _BuilderDefinitionMatcher(this._expected);
  
    @override
    bool matches(item, _) =>
        item is BuilderDefinition &&
        equals(_expected.builderFactories).matches(item.builderFactories, _) &&
        equals(_expected.buildExtensions).matches(item.buildExtensions, _) &&
        equals(_expected.requiredInputs).matches(item.requiredInputs, _) &&
        equals(_expected.runsBefore).matches(item.runsBefore, _) &&
        equals(_expected.appliesBuilders).matches(item.appliesBuilders, _) &&
        new _TargetBuilderConfigDefaultsMatcher(_expected.defaults)
            .matches(item.defaults, _) &&
        item.autoApply == _expected.autoApply &&
        item.isOptional == _expected.isOptional &&
        item.buildTo == _expected.buildTo &&
        item.import == _expected.import &&
        item.key == _expected.key &&
        item.package == _expected.package;
  
    @override
    Description describe(Description description) =>
        description.addDescriptionOf(_expected);
  }
  
  class _PostProcessBuilderDefinitionMatcher extends Matcher {
    final PostProcessBuilderDefinition _expected;
    _PostProcessBuilderDefinitionMatcher(this._expected);
  
    @override
    bool matches(item, _) =>
        item is PostProcessBuilderDefinition &&
        equals(_expected.builderFactory).matches(item.builderFactory, _) &&
        new _TargetBuilderConfigDefaultsMatcher(_expected.defaults)
            .matches(item.defaults, _) &&
        item.import == _expected.import &&
        item.key == _expected.key &&
        item.package == _expected.package;
  
    @override
    Description describe(Description description) =>
        description.addDescriptionOf(_expected);
  }
  
  class _GlobalBuilderConfigMatcher extends Matcher {
    final GlobalBuilderConfig _expected;
    _GlobalBuilderConfigMatcher(this._expected);
  
    @override
    bool matches(item, _) =>
        item is GlobalBuilderConfig &&
        equals(_expected.options.config).matches(item.options.config, _) &&
        equals(_expected.devOptions.config).matches(item.devOptions.config, _) &&
        equals(_expected.releaseOptions.config)
            .matches(item.releaseOptions.config, _);
  
    @override
    Description describe(Description description) =>
        description.addDescriptionOf(_expected);
  }
  
  class _TargetBuilderConfigDefaultsMatcher extends Matcher {
    final TargetBuilderConfigDefaults _expected;
    _TargetBuilderConfigDefaultsMatcher(this._expected);
  
    @override
    bool matches(item, _) =>
        item is TargetBuilderConfigDefaults &&
        equals(_expected.generateFor.include)
            .matches(item.generateFor.include, _) &&
        equals(_expected.generateFor.exclude)
            .matches(item.generateFor.exclude, _) &&
        equals(_expected.options.config).matches(item.options.config, _) &&
        equals(_expected.devOptions.config).matches(item.devOptions.config, _) &&
        equals(_expected.releaseOptions.config)
            .matches(item.releaseOptions.config, _);
  
    @override
    Description describe(Description description) =>
        description.addDescriptionOf(_expected);
  }
  
  void expectBuildTargets(
      Map<String, BuildTarget> actual, Map<String, BuildTarget> expected) {
    expect(actual.keys, unorderedEquals(expected.keys));
    for (var p in actual.keys) {
      expect(actual[p], new _BuildTargetMatcher(expected[p]));
    }
  }
  
  class _BuildTargetMatcher extends Matcher {
    final BuildTarget _expected;
    _BuildTargetMatcher(this._expected);
  
    @override
    bool matches(item, _) =>
        item is BuildTarget &&
        item.package == _expected.package &&
        new _BuilderConfigsMatcher(_expected.builders)
            .matches(item.builders, _) &&
        equals(_expected.dependencies).matches(item.dependencies, _) &&
        equals(_expected.sources.include).matches(item.sources.include, _) &&
        equals(_expected.sources.exclude).matches(item.sources.exclude, _);
  
    @override
    Description describe(Description description) =>
        description.addDescriptionOf(_expected);
  }
  
  class _BuilderConfigsMatcher extends Matcher {
    final Map<String, TargetBuilderConfig> _expected;
    _BuilderConfigsMatcher(this._expected);
  
    @override
    bool matches(item, _) {
      if (item is! Map<String, TargetBuilderConfig>) return false;
      final other = item as Map<String, TargetBuilderConfig>;
      if (!equals(_expected.keys).matches(other.keys, _)) return false;
      for (final key in _expected.keys) {
        final matcher = new _BuilderConfigMatcher(_expected[key]);
        if (!matcher.matches(other[key], _)) return false;
      }
      return true;
    }
  
    @override
    Description describe(Description description) =>
        description.addDescriptionOf(_expected);
  }
  
  class _BuilderConfigMatcher extends Matcher {
    final TargetBuilderConfig _expected;
    _BuilderConfigMatcher(this._expected);
  
    @override
    bool matches(item, _) =>
        item is TargetBuilderConfig &&
        item.isEnabled == _expected.isEnabled &&
        equals(_expected.generateFor?.include)
            .matches(item.generateFor?.include, _) &&
        equals(_expected.generateFor?.exclude)
            .matches(item.generateFor?.exclude, _) &&
        equals(_expected.options.config).matches(item.options.config, _) &&
        equals(_expected.devOptions.config).matches(item.devOptions.config, _) &&
        equals(_expected.releaseOptions.config)
            .matches(item.releaseOptions.config, _);
  
    @override
    Description describe(Description description) =>
        description.addDescriptionOf(_expected);
  }
  
  BuildTarget createBuildTarget(String package,
      {String key,
  
negative.code:     Map<String, PostProcessBuilderDefinition> expected) {
    expect(actual.keys, unorderedEquals(expected.keys));
    for (var p in actual.keys) {
      expect(actual[p], _matchesPostProcessBuilderDefinition(expected[p]));
    }
  }
  
  