testBindNonEnumerableFunctions() {
    // Create Foo and override non enumerable functions.
    const Foo = class {};
    Foo.prototype.constructor = () => {
      fail('real object should never be called');
    };
    /** @suppress {missingReturn} suppression added to enable type checking */
    Foo.prototype.hasOwnProperty = () => {
      fail('real object should never be called');
    };
    /** @suppress {missingReturn} suppression added to enable type checking */
    Foo.prototype.isPrototypeOf = () => {
      fail('real object should never be called');
    };
    /** @suppress {missingReturn} suppression added to enable type checking */
    Foo.prototype.propertyIsEnumerable = () => {
      fail('real object should never be called');
    };
    /** @suppress {missingReturn} suppression added to enable type checking */
    Foo.prototype.toLocaleString = () => {
      fail('real object should never be called');
    };
    /** @suppress {missingReturn} suppression added to enable type checking */
    Foo.prototype.toString = () => {
      fail('real object should never be called');
    };
    Foo.prototype.valueOf = () => {
      fail('real object should never be called');
    };

    // Create Mock and set $returns for toString.
    const mockControl = new MockControl();
    const mock = mockControl.createLooseMock(Foo);
    mock.constructor().$returns('constructor');
    mock.hasOwnProperty().$returns('hasOwnProperty');
    mock.isPrototypeOf().$returns('isPrototypeOf');
    mock.propertyIsEnumerable().$returns('propertyIsEnumerable');
    mock.toLocaleString().$returns('toLocaleString');
    mock.toString().$returns('toString');
    mock.valueOf().$returns('valueOf');

    // Execute and assert that the Mock is working correctly.
    mockControl.$replayAll();
    assertEquals('constructor', mock.constructor());
    assertEquals('hasOwnProperty', mock.hasOwnProperty());
    assertEquals('isPrototypeOf', mock.isPrototypeOf());
    assertEquals('propertyIsEnumerable', mock.propertyIsEnumerable());
    assertEquals('toLocaleString', mock.toLocaleString());
    assertEquals('toString', mock.toString());
    assertEquals('valueOf', mock.valueOf());
    mockControl.$verifyAll();
  }
@suppress {checkTypes,missingProperties,strictMissingProperties}
     suppression added to enable type checking