         XCTAssertEqual(yellowAnimals!.count, 2, "Should be able to return all records for given predicate.")
     }
     
+    func testAllWithPredicateGeneric() {
+        let predicate = NSPredicate(format: "color == %@", "yellow")
+        let yellowAnimals: [Animal] = Animal.allWithPredicate(predicate)!
+        XCTAssertEqual(yellowAnimals.count, 2, "Should be able to return all records for given predicate.")
+    }
+    
     func testAllWithAttribute() {
         let whiteAnimals = Animal.allWithAttribute("color", value: "white")
         XCTAssertEqual(whiteAnimals!.count, 2, "Should be able to return all records for given attribute.")
     }
     
+    func testAllWithAttributeGeneric() {
+        let whiteAnimals: [Animal] = Animal.allWithAttribute("color", value: "white")!
+        XCTAssertEqual(whiteAnimals.count, 2, "Should be able to return all records for given attribute.")
+    }
+    
     func testAllWithAttributes() {
         let whiteAttributes = ["name" : "Villy", "color" : "white"]
         

        // not sure how to test this in NSInMemoryStoreType
    }
    
    // MARK: Batch Updating
    
    func testBatchUpdate() {
        // not supported by NSInMemoryStoreType

        XCTAssertEqual(tinna.color, "lightgray", "Should be able to create instance of entity with attributes.")
    }
    
    // MARK: Find First or Create
    
    func testFirstOrCreateWithAttribute() {
        let snoopy = Animal.firstOrCreateWithAttribute("name", value: "Snoopy") as! Animal
        XCTAssertEqual(snoopy.name, "Snoopy", "Should be able to create record if it doesn't already exist.")
        
        let tinna = Animal.firstOrCreateWithAttribute("name", value: "Tinna") as! Animal
        XCTAssertEqual(tinna.color, "lightgray", "Should be able to return the first record with given attribute.")
    }
    
    func testFirstOrCreateWithAttributeGeneric() {
        let snoopy: Animal = Animal.firstOrCreateWithAttribute("name", value: "Snoopy")
        XCTAssertEqual(snoopy.name, "Snoopy", "Should be able to create record if it doesn't already exist.")
        
        let tinna: Animal = Animal.firstOrCreateWithAttribute("name", value: "Tinna")
        XCTAssertEqual(tinna.color, "lightgray", "Should be able to return the first record with given attribute.")
    }
    
