                 })
             })
         }
-        waitForExpectationsWithTimeout(100.0, handler:nil)
+        waitForExpectationsWithTimeout(10.0, handler:nil)
 
     }
     

                        ]
                        
                        //now we can post the goal
                        APIServiceManager.sharedInstance.postUserGoals(bodyBudgetSocialGoal, onCompletion: { (succes, message, code, goal, error) in
                            if success {
                                //now we can post the goal
                                APIServiceManager.sharedInstance.postUserGoals(bodyBudgetNewsGoal, onCompletion: { (succes, message, code, goal, error) in
                                    if success {
                                        //no
                                        APIServiceManager.sharedInstance.getGoalsOfType(.BudgetGoalString, onCompletion: { (success, message, code, goals, err) in

                XCTFail()
            }
            //we need to now get the activity link from our activities
            APIServiceManager.sharedInstance.getActivityLinkForActivityName(.socialString, onCompletion: { (success, socialActivityCategoryLink, message, code) in
                    if success {
                        //set body for budget social goal
                        let bodyTimeZoneSocialGoal = [
                            "@type": "TimeZoneGoal",
                            "_links": [
                                "yona:activityCategory": ["href": socialActivityCategoryLink]
                            ],
                            "zones": ["8:00-17:00", "20:00-22:00", "22:00-20:00"]
                        ]
                    }
                APIServiceManager.sharedInstance.getActivityLinkForActivityName(.newsString, onCompletion: { (success, newsActivityCategoryLink, message, code) in
                    if success {
                        //set body for goal
                        let bodyTimeZoneNewsGoal = [
                            "@type": "TimeZoneGoal",
                            "_links": [
                                "yona:activityCategory": ["href": newsActivityCategoryLink]
                            ],
                            "zones": ["8:00-17:00", "20:00-22:00"]
                        ]
                    }
                    
                        //add budget goal
                        APIServiceManager.sharedInstance.postUserGoals(bodyTimeZoneSocialGoal, onCompletion: { (success, message, code, goal, error) in
                            if success {

                                APIServiceManager.sharedInstance.postUserGoals(bodyTimeZoneNewsGoal, onCompletion: { (success, message, code, goal, error) in
                                    if success {
                                        //no
                                        APIServiceManager.sharedInstance.getGoalsOfType(.TimeZoneGoalString, onCompletion: { (success, message, code, goals, err) in
                                            if let goalsUnwrap = goals {
                                                if success {
                                                    for goal in goalsUnwrap {
                                                        print(goal.goalType)
                                                        XCTAssertFalse(goal.goalType! != YonaConstants.GoalType.TimeZoneGoalString.rawValue)
                                                    }
                                                    expectation.fulfill()
                                                } else {
                                                    XCTFail(message!)
                                                }
                                            }
                                        })
                                    } else {
                                        XCTFail(message!)
                                    }
                                })
                            } else {
                                XCTFail(message!)
                            }
                        })
                })
                    
            })
            
        }
        waitForExpectationsWithTimeout(10.0, handler:nil)
        
    }
    
