Crie um ManagedObjectContext para teste

- (void)setUp
{
[super setUp];
NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:[NSArray arrayWithObject:[NSBundle mainBundle]]];
NSPersistentStoreCoordinator *storeCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:managedObjectModel];
XCTAssertTrue([storeCoordinator addPersistentStoreWithType:NSInMemoryStoreType configuration:nil URL:nil options:nil error:NULL] ? YES : NO, @"Should be able to add in-memory store");
_managedObjectContext
= [[NSManagedObjectContext alloc] init];
_managedObjectContext
.persistentStoreCoordinator = storeCoordinator;
}