mock(toMock) {
    if (!this.shouldMakeMockControl_) {
      throw new Error(
          'MockControl not available on this environment. ' +
          'Call withMockControl if this environment is expected ' +
          'to contain a MockControl.');
    }
    const mock = this.mockControl.createStrictMock(toMock);
    // Mocks are not type-checkable. To reduce burden on tests that are
    // type checked, this is typed as "?" to turn off JSCompiler
    // checking.
    // TODO(user): Enable a type-checked mocking library.
    return /** @type {?} */ (mock);
  }
Creates a basic strict mock of a `toMock`. For more advanced mocking,
please use the MockControl directly.
@param {?Function|?Object} toMock
@return {?}