 
 */
     
+    internal class Block : NSObject, NSCoding {
+        
+        var used: Bool = true
+        var obj: AnyObject? = nil
+        
+        override init() {
+            super.init()
+        }
+        
+        init(used: Bool) {
+            super.init()
+            self.used = used
+        }
+        
+        init(obj:SOCoding) {
+            super.init()
+            self.obj = obj
+        }
+        
+        //MARK: NSCoding
+        
+        @objc required init(coder decoder: NSCoder) { // NS_DESIGNATED_INITIALIZER
+            super.init()
+            
+            used  = decoder.decodeBoolForKey("1")
+            obj = decoder.decodeObjectForKey("0")
+        }
+        
+        @objc func encodeWithCoder(encoder: NSCoder) {
+            encoder.encodeBool(used, forKey:"1")
+            
+            if obj != nil {
+                encoder.encodeObject(obj, forKey: "0")
+            }
+            
+        }
+        
+    }
+    
+    
     //MARK: Node
     
     func testNodeFastCoding() {

        println("Property encoding size is: \(data.length)")
    }
    
    /**
    func testPropertyCoding() {
     

    }
    
    */
    
    func testCodingNode() {
        
        var node = Node(testdata: true)
        var aObj = Block(used: true)
        aObj.obj = node
        
        
        var data = FastCoder.dataWithRootObject(aObj)
        //var bObj = FastCoder.objectWithData(data) as Node
        
        XCTAssertTrue(data.length == 152, "wrong size")
        println("Node encoding size is: \(data.length)")
    }

}
