anchor.diff:      }
     }
   }''';
  -      final Directory l10nDirectory = fs.currentDirectory.childDirectory('lib').childDirectory('l10n')
  -        ..createSync(recursive: true);
  -      l10nDirectory.childFile(defaultTemplateArbFileName)
  -        .writeAsStringSync(pluralMessageWithDateTimePlaceholder);
  -
  -      final LocalizationsGenerator generator = LocalizationsGenerator(fs);
  -      try {
  -        generator.initialize(
  -          l10nDirectoryPath: defaultArbPathString,
  -          templateArbFileName: defaultTemplateArbFileName,
  -          outputFileString: defaultOutputFileString,
  -          classNameString: defaultClassNameString,
  -        );
  -        generator.parseArbFiles();
  -        generator.generateClassMethods();
  -      } on Exception catch (e) {
  -        fail('Parsing template arb file should succeed: \n$e');
  -      }
  -
  -      expect(generator.classMethods, isNotEmpty);
  -      expect(
  -        generator.classMethods.first,
  -        '''  String helloWorlds(int count, Object currentDate) {
  +        final Directory l10nDirectory = fs.currentDirectory.childDirectory('lib').childDirectory('l10n')
  +          ..createSync(recursive: true);
  +        l10nDirectory.childFile(defaultTemplateArbFileName)
  +          .writeAsStringSync(pluralMessageWithDateTimePlaceholder);
  +
  +        final LocalizationsGenerator generator = LocalizationsGenerator(fs);
  +        try {
  +          generator.initialize(
  +            l10nDirectoryPath: defaultArbPathString,
  +            templateArbFileName: defaultTemplateArbFileName,
  +            outputFileString: defaultOutputFileString,
  +            classNameString: defaultClassNameString,
  +          );
  +          generator.parseArbFiles();
  +          generator.generateClassMethods();
  +        } on Exception catch (e) {
  +          fail('Parsing template arb file should succeed: \n$e');
  +        }
  +
  +        expect(generator.classMethods, isNotEmpty);
  +        expect(
  +          generator.classMethods.first,
  +          '''  String helloWorlds(int count, Object currentDate) {
       final DateFormat currentDateDateFormat = DateFormat.yMMMMEEEEd(_localeName);
       final String currentDateString = currentDateDateFormat.format(currentDate);
   
  
positive.code:       }
    }
  }''';
        final Directory l10nDirectory = fs.currentDirectory.childDirectory('lib').childDirectory('l10n')
          ..createSync(recursive: true);
        l10nDirectory.childFile(defaultTemplateArbFileName)
          .writeAsStringSync(singleDateMessageArbFileString);
  
        final LocalizationsGenerator generator = LocalizationsGenerator(fs);
        try {
          generator.initialize(
            l10nDirectoryPath: defaultArbPathString,
            templateArbFileName: defaultTemplateArbFileName,
            outputFileString: defaultOutputFileString,
            classNameString: defaultClassNameString,
          );
          generator.parseArbFiles();
          generator.generateClassMethods();
        } on Exception catch (e) {
          fail('Parsing template arb file should succeed: \n$e');
        }
  
        expect(generator.classMethods, isNotEmpty);
        expect(
          generator.classMethods.first,
          '''  String springBegins(Object springStartDate) {
      final DateFormat springStartDateDateFormat = DateFormat.yMMMMEEEEd(_localeName);
      final String springStartDateString = springStartDateDateFormat.format(springStartDate);
  
  
negative.code:     );
    }
  '''
          );
        });
  
        test('correctly generates a plural message with number placeholders', () {
          const String pluralMessageWithDateTimePlaceholder = '''{
    "helloWorlds": "{count,plural, =1{Hello World of {population} citizens}=2{Hello two worlds with {population} total citizens}many{Hello all {count} worlds, with a total of {population} citizens}other{Hello other {count} worlds, with a total of {population} citizens}}",
    "@helloWorlds": {
      "placeholders": {
  