         let font = UIFont.italicSystemFont(ofSize: 12)
         attributedString.setFont(font, range: wordRange)
 
-        assert(attributedString, has: (NSFontAttributeName, font), in: wordRange, "setFont will work")
+        assert(attributedString, has: (NSAttributedStringKey.font, font), in: wordRange, "setFont will work")
     }
 
     func testSetFontColor() {

@testable import Rocket_Chat

private func assert<T: Equatable>(_ attributedString: NSAttributedString,
                                  has attribute: (String, T),
                                  in range: NSRange, _ message: String) {
    attributedString.enumerateAttributes(in: range, options: [], using: { attributes, crange, _ in
        XCTAssert(range.toRange() == crange.toRange() && attributes[attribute.0] as? T == attribute.1, message)
    })
}


        let color = UIColor.red
        attributedString.setFontColor(color, range: wordRange)

        assert(attributedString, has: (NSAttributedStringKey.foregroundColor, color), in: wordRange, "setFontColor will work")
    }

    func testSetBackgroundColor() {
