                 it("should map correctly") {
                     let expectedValue = [["stringProperty" : ""]]
                     let dict: NSDictionary = ["arrayMappableProperty" : expectedValue]
-                    let mapper = KeyedMapper<Model>(JSON: dict, type: Model.self)
+                    let mapper = KeyedMapper(JSON: dict, type: ModelWithArrayProperty.self)
                     let models: [SubModel] = try! mapper.from(.arrayMappableProperty)
                     
                     expect(models).toNot(beNil())

                it("should throw a typeMismatch error") {
                    let expectedValue = 2
                    let dict: NSDictionary = ["arrayMappableProperty" : expectedValue]
                    let mapper = KeyedMapper<Model>(JSON: dict, type: Model.self)
                    let field = Model.Key.arrayMappableProperty
                    
                    do {
                        let _: [SubModel] = try mapper.from(field)
                    } catch let error as MapperError {
                        expect(error) == MapperError.typeMismatch(field: field.stringValue, forType: Model.self, value: expectedValue, expectedType: [NSDictionary].self)
                    } catch {
                        XCTFail("Error thrown from KeyedMapper<T: Mappable>.from was not a MapperError")
                    }

fileprivate struct Model: Mappable {
    fileprivate enum Key: String, JSONKey {
        case mappableProperty
    }
    
    fileprivate let mappableProperty: SubModel
    
    fileprivate init(map: KeyedMapper<Model>) throws {
        try self.mappableProperty = map.from(.mappableProperty)
    }
}

fileprivate struct ModelWithArrayProperty: Mappable {
    fileprivate enum Key: String, JSONKey {
        case arrayMappableProperty
    }

    fileprivate let arrayMappableProperty: [SubModel]

    fileprivate init(map: KeyedMapper<ModelWithArrayProperty>) throws {
        try self.arrayMappableProperty = map.from(.arrayMappableProperty)
    }
}


fileprivate struct ModelWithTwoDArrayProperty: Mappable {
    fileprivate enum Key: String, JSONKey {
        case twoDArrayMappableProperty
    }

    fileprivate let twoDArrayMappableProperty: [[SubModel]]

    fileprivate init(map: KeyedMapper<ModelWithTwoDArrayProperty>) throws {
        try self.twoDArrayMappableProperty = map.from(.twoDArrayMappableProperty)
    }
}

