testVerificationErrorMessages() {
    const mockObj = mock.mock({
      method: function(i) {
        return i;
      }
    });

    // Failure when there are no recorded calls.
    let e = assertThrows(function() {
      mock.verify(mockObj).method(4);
    });
    assertTrue(e instanceof VerificationError);
    let expected = '\nExpected: method(4) at least 1 times\n' +
        'Recorded: No recorded calls';
    assertEquals(expected, e.message);


    // Failure when there are recorded calls with ints and functions
    // as arguments.
    const callback = function() {};
    const callbackId = mock.getUid(callback);

    mockObj.method(1);
    mockObj.method(2);
    mockObj.method(callback);

    e = assertThrows(function() {
      mock.verify(mockObj).method(3);
    });
    assertTrue(e instanceof VerificationError);

    expected = '\nExpected: method(3) at least 1 times\n' +
        'Recorded: method(1),\n' +
        '          method(2),\n' +
        '          method(<function #anonymous' + callbackId + '>)';
    assertEquals(expected, e.message);

    // With mockFunctions
    const mockCallback = mock.mockFunction(callback);
    e = assertThrows(function() {
      mock.verify(mockCallback)(5);
    });
    expected = '\nExpected: #mockFor<#anonymous' + callbackId +
        '>(5) at least' +
        ' 1 times\n' +
        'Recorded: No recorded calls';

    mockCallback(8);
    mock.verify(mockCallback)(8);
    assertEquals(expected, e.message);

    // Objects with circular references should not fail.
    const obj = {x: 1};
    obj.y = obj;

    mockCallback(obj);
    e = assertThrows(function() {
      mock.verify(mockCallback)(5);
    });
    assertTrue(e instanceof VerificationError);

    // Should respect string representation of different custom classes.
    const myClass = function() {};
    myClass.prototype.toString = function() {
      return '<superClass>';
    };

    const mockFunction = mock.mockFunction(function f() {});
    mockFunction(new myClass());

    e = assertThrows(function() {
      mock.verify(mockFunction)(5);
    });
    expected = '\nExpected: #mockFor<f>(5) at least 1 times\n' +
        'Recorded: #mockFor<f>(<superClass>)';
    assertEquals(expected, e.message);
  }
When a function invocation verification fails, it should show the failed
expectation call, as well as the recorded calls to the same method.
@suppress {strictMissingProperties,checkTypes} suppression added to enable
type checking