finish unit test for NSManagedObject to NSData