In general the steps will follow this simple pattern:
- Create the mock
- Define behaviour
- Inject the mock into the component under test
- Run the component under test
- Optionally verify how the mock was called
There's a subtle yet important difference between mocking and stubbing. Stubbing typically involves faking what data is returned by an object, while mocking is faking the behaviour. See the pages on Stubbing and Mocking for examples.