             let image = UIImage(data: photoNSData)
             
             XCTAssertNotNil(image)
+            
             // Upload Image
-            
         //push to object storage, then on success push to cloudant sync
         ObjectStorageDataManager.SharedInstance.objectStorageClient.uploadImage(FBUserID, imageName: imageName, image: image!,
             onSuccess: { (imageURL: String) in

    
    var imageNames: [String: String]!
    
    var imageCount: Int!
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.

                print("creating cloudant picture document...")
                CloudantSyncClient.SharedInstance.createPictureDoc(caption, fileName: imageName, url: imageURL, ownerID: FBUserID, width: "\(image!.size.width)", height: "\(image!.size.height)")
                
                imageCount-- //decrement number of images to upload remaining
                //check if test is done (all photos uploaded)
                if (imageCount == 0) {
                    CloudantSyncClient.SharedInstance.pushToRemoteDatabaseSynchronous()
                    self.xctExpectation?.fulfill() //test is done if all images added
                }
