         if let unpackedNested: NestedDefault = Storage.unpack("nested_default") {
             let names = unpackedNested.names
             
-            XCTAssert(names.count == 3, "nested string array was incorrect")
-            XCTAssert(names[0] == "Nested", "nested string was incorrect")
-            XCTAssert(names[1] == "Default", "nested string was incorrect")
-            XCTAssert(names[2] == "Array", "nested string was incorrect")
+            if names.count == 3 {
+                XCTAssert(names[0] == "Nested", "nested string was incorrect")
+                XCTAssert(names[1] == "Default", "nested string was incorrect")
+                XCTAssert(names[2] == "Array", "nested string was incorrect")
+            } else {
+                XCTFail("nested string array was incorrect")
+            }
 
             let numbers = unpackedNested.numbers
             
-            XCTAssert(numbers.count == 5, "nested int array was incorrect")
-            XCTAssert(numbers[0] == 1, "nested int was incorrect")
-            XCTAssert(numbers[1] == 3, "nested int was incorrect")
-            XCTAssert(numbers[2] == 5, "nested int was incorrect")
-            XCTAssert(numbers[3] == 7, "nested int was incorrect")
-            XCTAssert(numbers[4] == 9, "nested int was incorrect")
+            if numbers.count == 5 {
+                XCTAssert(numbers[0] == 1, "nested int was incorrect")
+                XCTAssert(numbers[1] == 3, "nested int was incorrect")
+                XCTAssert(numbers[2] == 5, "nested int was incorrect")
+                XCTAssert(numbers[3] == 7, "nested int was incorrect")
+                XCTAssert(numbers[4] == 9, "nested int was incorrect")
+            } else {
+                XCTFail("nested int array was incorrect")
+            }
 
             let ages = unpackedNested.ages
             
-            XCTAssert(ages.count == 3, "nested float array was incorrect")
-            XCTAssert(ages[0] == 31.5, "nested float was incorrect")
-            XCTAssert(ages[1] == 42.0, "nested float was incorrect")
-            XCTAssert(ages[2] == 23.1, "nested float was incorrect")
+            if ages.count == 3 {
+                XCTAssert(ages[0] == 31.5, "nested float was incorrect")
+                XCTAssert(ages[1] == 42.0, "nested float was incorrect")
+                XCTAssert(ages[2] == 23.1, "nested float was incorrect")
+            } else {
+                XCTFail("nested float array was incorrect")
+            }
         } else {
             XCTFail("no nested defaults array could be unpacked")
         }

        }
    }
    
    func testDefaultArray() {
        let defaults = [0,1,2,3,4]
        
        Storage.pack(defaults, key: "defaults_array")
        
        if let unpackedDefaultsArray: [Int] = Storage.unpack("defaults_array") {
            let first = unpackedDefaultsArray[0]
            let second = unpackedDefaultsArray[2]
            let third = unpackedDefaultsArray[4]
            
            XCTAssert(first == 0, "default array first was incorrect")
            XCTAssert(second == 2, "default array second was incorrect")
            XCTAssert(third == 4, "default array third was incorrect")
        } else {
            XCTFail("no default array could be unpacked")
        }
    }
    

    override func setUp() {
        super.setUp()
        
        dispatch_once(&token) {
            let testFolder = JSONWarehouse(key: "basic").cacheFileURL().URLByDeletingLastPathComponent!
            print("testing in",testFolder)
            
            // remove old files before our test
            let urls = try? NSFileManager.defaultManager().contentsOfDirectoryAtURL(testFolder, includingPropertiesForKeys: nil, options: [.SkipsSubdirectoryDescendants, .SkipsHiddenFiles])
            if let urls = urls {
                for url in urls {
                    let _ = try? NSFileManager.defaultManager().removeItemAtURL(url)
                }
            }
        }
    }
    
    override func tearDown() {
        super.tearDown()
    }
    
