     types
     """#
 
-    XCTAssertEqual(errorMessage, expectedMessage)
+    XCTAssertEqual(receivedWarnings, [expectedMessage])
   }
 
   func testPlurals() throws {


  func testMultipleFilesDuplicate() throws {
    let parser = try Strings.Parser()
    var receivedWarning: String?
    parser.warningHandler = { message, _, _ -> Void in
      receivedWarning = message
    }
    try parser.searchAndParse(path: Fixtures.path(for: "Localizable.strings", sub: .strings))
    try parser.searchAndParse(path: Fixtures.path(for: "Localizable.strings", sub: .strings))

    let errorMessage = try XCTUnwrap(receivedWarning)
    let expectedMessage = #"""
    Table "Localizable" already loaded by other parser, the parser for [.strings] files cannot modify existing keys:
    ObjectOwnership


  func testSameTableWithPluralsParsingPluralsFirst() throws {
    let parser = try Strings.Parser()
    var receivedWarnings = [String]()
    parser.warningHandler = { message, _, _ -> Void in
      receivedWarnings.append(message)
    }
    try parser.searchAndParse(path: Fixtures.path(for: "Localizable.stringsdict", sub: .strings))
    try parser.searchAndParse(path: Fixtures.path(for: "Localizable.strings", sub: .strings))

    let expectedMessage = #"""
    Table "Localizable" already loaded by other parser, the parser for [.strings] files cannot modify existing keys:
    apples.count
    """#

    XCTAssertEqual(receivedWarnings, [expectedMessage])

    let result = parser.stencilContext()
    XCTDiffContexts(result, expected: "plurals-same-table", sub: .strings)
