anchor.diff:        );
       });
   
  -    test('should throw when resource is missing resource attribute:', () {
  +    test('should throw when resource is missing resource attribute', () {
         const String arbFileWithMissingResourceAttribute = '''{
     "title": "Stocks"
   }''';
  
positive.code:     );
    }
  '''
        );
      });
  
      test('correctly adds optional parameters to numbers:', () {
        const String singleNumberMessage = '''{
    "courseCompletion": "You have completed {progress} of the course.",
    "@courseCompletion": {
      "description": "The amount of progress the student has made in their class.",
      "placeholders": {
        "progress": {
          "type": "Number",
          "format": "decimalPercentPattern",
          "optionalParameters": {
            "decimalDigits": 2
          }
        }
      }
    }
  }''';
        final Directory l10nDirectory = fs.currentDirectory.childDirectory('lib').childDirectory('l10n')
          ..createSync(recursive: true);
        l10nDirectory.childFile(defaultTemplateArbFileName)
          .writeAsStringSync(singleNumberMessage);
  
        final LocalizationsGenerator generator = LocalizationsGenerator(fs);
        try {
  
negative.code:     }
    }
  }''';
          final Directory l10nDirectory = fs.currentDirectory.childDirectory('lib').childDirectory('l10n')
            ..createSync(recursive: true);
          l10nDirectory.childFile(defaultTemplateArbFileName)
            .writeAsStringSync(singlePluralMessageArbFileString);
  
          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) {
      return Intl.plural(
        count,
        locale: _localeName,
  