public static function assertNumCalls(
      FBMock_Mock $mock,
      $method_name,
      $expected_num_calls,
      $msg = '') {
    FBMock_Utils::assertString($method_name);
    FBMock_Utils::assertInt($expected_num_calls);
    $call_count = count($mock->mockGetCalls($method_name));
    PHPUnit\Framework\TestCase::assertEquals(
      $expected_num_calls,
      $call_count,
      $msg ?: "$method_name called wrong number of times"
    );
  }