     }
     
     func testJSONObjectOptionalValueForKey() {
-        let jsonObject = try! JSONObject<Person.PropertyKey>(json: person.jsonValue)
+        let jsonObject = try! JSONObject<Person.PropertyKey>(json: Data.person.jsonValue)
         let emptyJsonObject = try! JSONObject<Person.PropertyKey>(json: JSON([String: JSON]()))
         
         let firstName: String? = jsonObject.value(for: .firstName)

        let emptyIsMarried: Bool? = emptyJsonObject.value(for: .isMarried)
        let emptyHeight: Double? = emptyJsonObject.value(for: .height)
        
        XCTAssertEqual(firstName, person.firstName)
        XCTAssertEqual(lastName, person.lastName)
        XCTAssertEqual(age, person.age)
        XCTAssertEqual(isMarried, person.isMarried)
        XCTAssertEqual(height, person.height)
        XCTAssertNil(nilFirstName)
        XCTAssertNil(emptyFirstName)
        XCTAssertNil(emptyLastName)


class JSONObjectTests: XCTestCase {
    
    func testJSONObjectThrowableValueForKey() {
        XCTAssertEqual(try? Data.jsonObject.value(for: .firstName), Data.person.firstName)
        XCTAssertEqual(try? Data.jsonObject.value(for: .lastName), Data.person.lastName)
        XCTAssertEqual(try? Data.jsonObject.value(for: .age), Data.person.age)
        XCTAssertEqual(try? Data.jsonObject.value(for: .isMarried), Data.person.isMarried)
        XCTAssertEqual(try? Data.jsonObject.value(for: .height), Data.person.height)
        
        XCTAssertThrowsError(try JSONObject<Person.PropertyKey>(json: JSON(5)), "Init with non object hould fail") { error in
            XCTAssertEqual(error as? JSONModelError, .invalidJSON)
        }
        
        do {
            let firstName: String = try Data.emptyJsonObject.value(for: .firstName)
            XCTFail("\(firstName) method should throw")
        } catch let error {
            XCTAssertEqual(error as? JSONModelError, .invalidElement)
        }
        
        do {
            let lastName: String = try Data.emptyJsonObject.value(for: .lastName)
            XCTFail("\(lastName) method should throw")
        } catch let error {
            XCTAssertEqual(error as? JSONModelError, .invalidElement)
        }
        
        do {
            let age: Int = try Data.emptyJsonObject.value(for: .age)
            XCTFail("\(age) method should throw")
        } catch let error {
            XCTAssertEqual(error as? JSONModelError, .invalidElement)
        }
        
        do {
            let isMarried: Bool = try Data.emptyJsonObject.value(for: .isMarried)
            XCTFail("\(isMarried) method should throw")
        } catch let error {
            XCTAssertEqual(error as? JSONModelError, .invalidElement)
        }
        
        do {
            let height: Double = try Data.emptyJsonObject.value(for: .height)
            XCTFail("\(height) method should throw")
        } catch let error {
            XCTAssertEqual(error as? JSONModelError, .invalidElement)
        }
        
        do {
            let firstName: Double = try Data.jsonObject.value(for: .firstName)
            XCTFail("\(firstName) method should throw")
        } catch let error {
            XCTAssertEqual(error as? JSONModelError, .invalidElement)
