refactor: making client context shared and updating scope specs

I've put the mocks and stubs for client & its related objects into a separate shared client context file.
It will make specs much cleaner and easier to maintain as the interface to some of these classes changes.

I've refactored scope specs to use this shared context.