Here’s a simple example of stubbing with OCMock.
Go here to see how to setup OCMock in XCode.

https://agilewarrior.wordpress.com/2015/09/25/how-to-add-ocmock-to-xcode-7/

TaxCalculator.h

#import <Foundation/Foundation.h>
#import "SubscriptionManager.h"

@interface TaxCalculator : NSObject
-(id)initWith:(SubscriptionManager *)subscriptionManager;
- (double)calculateTax;
@end

TaxCalculator.m

#import "TaxCalculator.h"

@interface TaxCalculator()
@property (nonatomic, strong) SubscriptionManager *subscriptionManager;
@end

@implementation TaxCalculator

-(id)initWith:(SubscriptionManager *)subscriptionManager {
    if (self = [super init]) {
        self.subscriptionManager = subscriptionManager;
        return self;
    }
    return nil;
}

-(double)calculateTax {
    if ([self.subscriptionManager isPremium]) {
        return 0.0;
    }
    return 1.0;
}

@end

SubscriptionManager.h

#import <Foundation/Foundation.h>

@interface SubscriptionManager : NSObject
-(BOOL)isPremium;
@end

SubscriptionManager.m

#import "SubscriptionManager.h"

@implementation SubscriptionManager
-(BOOL)isPremium {
    return true;
}
@end

TaxCalculatorTest.m

#import <XCTest/XCTest.h>
#import <OCMock/OCMock.h>
#import "TaxCalculator.h"
#import "SubscriptionManager.h"

@interface TaxCalculatorTest : XCTestCase
@property (nonatomic, strong) TaxCalculator *calculator;
@property (nonatomic, strong) SubscriptionManager *mock;
@end

@implementation TaxCalculatorTest

- (void)setUp {
    [super setUp];
    self.mock = OCMClassMock([SubscriptionManager class]);
    self.calculator = [[TaxCalculator alloc] initWith:self.mock];
}

- (void)testTaxesAreZeroForPremiumUsers {
    OCMStub([self.mock isPremium]).andReturn(true);
    XCTAssertEqual(0.0, [self.calculator calculateTax]);
}

- (void)testTaxesAreNonZeroForNonPremiumUsers {
    OCMStub([self.mock isPremium]).andReturn(false);
    XCTAssertEqual(1.0, [self.calculator calculateTax]);
}

@end