 
       let dictionary =  Dictionary(grouping: array, by: { return $0.first })
       XCTAssert(groupedDictionary.keys == dictionary.keys)
-
+      groupedDictionary.keys.forEach { key in
+         XCTAssertTrue(groupedDictionary[key]! == dictionary[key]!)
+      }
     }
 
     do {


      let dictionary =  Dictionary(grouping: array, by: { return $0 })
      XCTAssert(groupedDictionary.keys == dictionary.keys)
    }

    do {

      XCTAssertNotNil(groupedDictionary["odd"])
      XCTAssertTrue(groupedDictionary["odd"]! == [1, 3, 5, 7, 9])

      enum Parity: CustomStringConvertible {
        case even, odd
        init(_ value: Int) {
          self = value % 2 == 0 ? .even : .odd
        }
        var description: String {
          return self == .even ? "even" : "odd"
        }
      }

      let dictionary = Dictionary(grouping: array , by: Parity.init )
      XCTAssert(groupedDictionary.keys.count == dictionary.keys.count)
      XCTAssert(groupedDictionary["even"]! == dictionary[Parity.even]!)
      XCTAssert(groupedDictionary["odd"]! == dictionary[Parity.odd]!)
      groupedDictionary.keys.forEach { key in
        let parityKey = key == "even" ? Parity.even : Parity.odd
        XCTAssertTrue(groupedDictionary[key]! == dictionary[parityKey]!)
      }
    }
  }

