text: 'use strict';
  
  /* jshint ignore:start */
  /**
   * This code was generated by
   * \ / _    _  _|   _  _
   *  | (_)\/(_)(_|\/| |(/_  v1.0.0
   *       /       /
   */
  /* jshint ignore:end */
  
  var Holodeck = require('../../../../holodeck');  /* jshint ignore:line */
  var Request = require(
      '../../../../../../lib/http/request');  /* jshint ignore:line */
  var Response = require(
      '../../../../../../lib/http/response');  /* jshint ignore:line */
  var RestException = require(
      '../../../../../../lib/base/RestException');  /* jshint ignore:line */
  var Twilio = require('../../../../../../lib');  /* jshint ignore:line */
  
  
  var client;
  var holodeck;
  
  describe('IncomingPhoneNumber', function() {
    beforeEach(function() {
      holodeck = new Holodeck();
      client = new Twilio('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'AUTHTOKEN', {
        httpClient: holodeck
      });
    });
    it('should generate valid update request',
      function(done) {
        holodeck.mock(new Response(500, '{}'));
  
        var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                                      .incomingPhoneNumbers('PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update();
        promise.then(function() {
          throw new Error('failed');
        }, function(error) {
          expect(error.constructor).toBe(RestException.prototype.constructor);
          done();
        }).done();
  
        var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
        var sid = 'PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
        var url = `https://api.twilio.com/2010-04-01/Accounts/${accountSid}/IncomingPhoneNumbers/${sid}.json`;
  
        holodeck.assertHasRequest(new Request({
          method: 'POST',
          url: url
        }));
      }
    );
    it('should generate valid update response',
      function(done) {
        var body = JSON.stringify({
            'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'address_requirements': 'none',
            'address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'api_version': '2010-04-01',
            'beta': false,
            'capabilities': {
                'mms': true,
                'sms': false,
                'voice': true
            },
            'date_created': 'Thu, 30 Jul 2015 23:19:04 +0000',
            'date_updated': 'Thu, 30 Jul 2015 23:19:04 +0000',
            'emergency_status': 'Inactive',
            'emergency_address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'friendly_name': '(808) 925-5327',
            'identity_sid': 'RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'origin': 'origin',
            'phone_number': '+18089255327',
            'sid': 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'sms_application_sid': '',
            'sms_fallback_method': 'POST',
            'sms_fallback_url': '',
            'sms_method': 'POST',
            'sms_url': '',
            'status_callback': '',
            'status_callback_method': 'POST',
            'trunk_sid': null,
            'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json',
            'voice_application_sid': '',
            'voice_caller_id_lookup': false,
            'voice_fallback_method': 'POST',
            'voice_fallback_url': null,
            'voice_method': 'POST',
            'voice_url': null,
            'bundle_sid': 'BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
        });
  
        holodeck.mock(new Response(200, body));
  
        var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                                      .incomingPhoneNumbers('PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update();
        promise.then(function(response) {
          expect(response).toBeDefined();
          done();
        }, function() {
          throw new Error('failed');
        }).done();
      }
    );
    it('should generate valid fetch request',
      function(done) {
        holodeck.mock(new Response(500, '{}'));
  
        var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                                      .incomingPhoneNumbers('PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch();
        promise.then(function() {
          throw new Error('failed');
        }, function(error) {
          expect(error.constructor).toBe(RestException.prototype.constructor);
          done();
        }).done();
  
        var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
        var sid = 'PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
        var url = `https://api.twilio.com/2010-04-01/Accounts/${accountSid}/IncomingPhoneNumbers/${sid}.json`;
  
        holodeck.assertHasRequest(new Request({
          method: 'GET',
          url: url
        }));
      }
    );
    it('should generate valid fetch response',
      function(done) {
        var body = JSON.stringify({
            'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'address_requirements': 'none',
            'address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'api_version': '2010-04-01',
            'beta': false,
            'capabilities': {
                'mms': true,
                'sms': false,
                'voice': true
            },
            'date_created': 'Thu, 30 Jul 2015 23:19:04 +0000',
            'date_updated': 'Thu, 30 Jul 2015 23:19:04 +0000',
            'emergency_status': 'Active',
            'emergency_address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'friendly_name': '(808) 925-5327',
            'identity_sid': 'RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'origin': 'origin',
            'phone_number': '+18089255327',
            'sid': 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'sms_application_sid': '',
            'sms_fallback_method': 'POST',
            'sms_fallback_url': '',
            'sms_method': 'POST',
            'sms_url': '',
            'status_callback': '',
            'status_callback_method': 'POST',
            'trunk_sid': null,
            'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json',
            'voice_application_sid': '',
            'voice_caller_id_lookup': false,
            'voice_fallback_method': 'POST',
            'voice_fallback_url': null,
            'voice_method': 'POST',
            'voice_url': null,
            'bundle_sid': 'BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
        });
  
        holodeck.mock(new Response(200, body));
  
        var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                                      .incomingPhoneNumbers('PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch();
        promise.then(function(response) {
          expect(response).toBeDefined();
          done();
        }, function() {
          throw new Error('failed');
        }).done();
      }
    );
    it('should generate valid remove request',
      function(done) {
        holodeck.mock(new Response(500, '{}'));
  
        var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                                      .incomingPhoneNumbers('PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').remove();
        promise.then(function() {
          throw new Error('failed');
        }, function(error) {
          expect(error.constructor).toBe(RestException.prototype.constructor);
          done();
        }).done();
  
        var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
        var sid = 'PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
        var url = `https://api.twilio.com/2010-04-01/Accounts/${accountSid}/IncomingPhoneNumbers/${sid}.json`;
  
        holodeck.assertHasRequest(new Request({
          method: 'DELETE',
          url: url
        }));
      }
    );
    it('should generate valid delete response',
      function(done) {
        var body = JSON.stringify(null);
  
        holodeck.mock(new Response(204, body));
  
        var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                                      .incomingPhoneNumbers('PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').remove();
        promise.then(function(response) {
          expect(response).toBe(true);
          done();
        }, function() {
          throw new Error('failed');
        }).done();
      }
    );
    it('should treat the first each arg as a callback',
      function(done) {
        var body = JSON.stringify({
            'end': 0,
            'first_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1&Page=0',
            'incoming_phone_numbers': [
                {
                    'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'address_requirements': 'none',
                    'address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'api_version': '2010-04-01',
                    'beta': null,
                    'capabilities': {
                        'mms': true,
                        'sms': false,
                        'voice': true
                    },
                    'date_created': 'Thu, 30 Jul 2015 23:19:04 +0000',
                    'date_updated': 'Thu, 30 Jul 2015 23:19:04 +0000',
                    'emergency_status': 'Active',
                    'emergency_address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'friendly_name': '(808) 925-5327',
                    'identity_sid': 'RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'origin': 'origin',
                    'phone_number': '+18089255327',
                    'sid': 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'sms_application_sid': '',
                    'sms_fallback_method': 'POST',
                    'sms_fallback_url': '',
                    'sms_method': 'POST',
                    'sms_url': '',
                    'status_callback': '',
                    'status_callback_method': 'POST',
                    'trunk_sid': null,
                    'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json',
                    'voice_application_sid': '',
                    'voice_caller_id_lookup': false,
                    'voice_fallback_method': 'POST',
                    'voice_fallback_url': null,
                    'voice_method': 'POST',
                    'voice_url': null,
                    'bundle_sid': 'BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
                }
            ],
            'last_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1&Page=2',
            'next_page_uri': null,
            'num_pages': 3,
            'page': 0,
            'page_size': 1,
            'previous_page_uri': null,
            'start': 0,
            'total': 3,
            'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1'
        });
        holodeck.mock(new Response(200, body));
        client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                        .incomingPhoneNumbers.each(() => done());
      }
    );
    it('should treat the second arg as a callback',
      function(done) {
        var body = JSON.stringify({
            'end': 0,
            'first_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1&Page=0',
            'incoming_phone_numbers': [
                {
                    'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'address_requirements': 'none',
                    'address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'api_version': '2010-04-01',
                    'beta': null,
                    'capabilities': {
                        'mms': true,
                        'sms': false,
                        'voice': true
                    },
                    'date_created': 'Thu, 30 Jul 2015 23:19:04 +0000',
                    'date_updated': 'Thu, 30 Jul 2015 23:19:04 +0000',
                    'emergency_status': 'Active',
                    'emergency_address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'friendly_name': '(808) 925-5327',
                    'identity_sid': 'RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'origin': 'origin',
                    'phone_number': '+18089255327',
                    'sid': 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'sms_application_sid': '',
                    'sms_fallback_method': 'POST',
                    'sms_fallback_url': '',
                    'sms_method': 'POST',
                    'sms_url': '',
                    'status_callback': '',
                    'status_callback_method': 'POST',
                    'trunk_sid': null,
                    'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json',
                    'voice_application_sid': '',
                    'voice_caller_id_lookup': false,
                    'voice_fallback_method': 'POST',
                    'voice_fallback_url': null,
                    'voice_method': 'POST',
                    'voice_url': null,
                    'bundle_sid': 'BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
                }
            ],
            'last_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1&Page=2',
            'next_page_uri': null,
            'num_pages': 3,
            'page': 0,
            'page_size': 1,
            'previous_page_uri': null,
            'start': 0,
            'total': 3,
            'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1'
        });
        holodeck.mock(new Response(200, body));
        client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                        .incomingPhoneNumbers.each({pageSize: 20}, () => done());
        holodeck.assertHasRequest(new Request({
            method: 'GET',
            url: 'https://api.twilio.com/2010-04-01/Accounts/${accountSid}/IncomingPhoneNumbers.json',
            params: {PageSize: 20},
        }));
      }
    );
    it('should find the callback in the opts object',
      function(done) {
        var body = JSON.stringify({
            'end': 0,
            'first_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1&Page=0',
            'incoming_phone_numbers': [
                {
                    'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'address_requirements': 'none',
                    'address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'api_version': '2010-04-01',
                    'beta': null,
                    'capabilities': {
                        'mms': true,
                        'sms': false,
                        'voice': true
                    },
                    'date_created': 'Thu, 30 Jul 2015 23:19:04 +0000',
                    'date_updated': 'Thu, 30 Jul 2015 23:19:04 +0000',
                    'emergency_status': 'Active',
                    'emergency_address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'friendly_name': '(808) 925-5327',
                    'identity_sid': 'RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'origin': 'origin',
                    'phone_number': '+18089255327',
                    'sid': 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'sms_application_sid': '',
                    'sms_fallback_method': 'POST',
                    'sms_fallback_url': '',
                    'sms_method': 'POST',
                    'sms_url': '',
                    'status_callback': '',
                    'status_callback_method': 'POST',
                    'trunk_sid': null,
                    'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json',
                    'voice_application_sid': '',
                    'voice_caller_id_lookup': false,
                    'voice_fallback_method': 'POST',
                    'voice_fallback_url': null,
                    'voice_method': 'POST',
                    'voice_url': null,
                    'bundle_sid': 'BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
                }
            ],
            'last_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1&Page=2',
            'next_page_uri': null,
            'num_pages': 3,
            'page': 0,
            'page_size': 1,
            'previous_page_uri': null,
            'start': 0,
            'total': 3,
            'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1'
        });
        holodeck.mock(new Response(200, body));
        client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                        .incomingPhoneNumbers.each({callback: () => done()}, () => fail('wrong callback!'));
      }
    );
    it('should generate valid list request',
      function(done) {
        holodeck.mock(new Response(500, '{}'));
  
        var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                                      .incomingPhoneNumbers.list();
        promise.then(function() {
          throw new Error('failed');
        }, function(error) {
          expect(error.constructor).toBe(RestException.prototype.constructor);
          done();
        }).done();
  
        var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
        var url = `https://api.twilio.com/2010-04-01/Accounts/${accountSid}/IncomingPhoneNumbers.json`;
  
        holodeck.assertHasRequest(new Request({
          method: 'GET',
          url: url
        }));
      }
    );
    it('should generate valid read_full response',
      function(done) {
        var body = JSON.stringify({
            'end': 0,
            'first_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1&Page=0',
            'incoming_phone_numbers': [
                {
                    'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'address_requirements': 'none',
                    'address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'api_version': '2010-04-01',
                    'beta': null,
                    'capabilities': {
                        'mms': true,
                        'sms': false,
                        'voice': true
                    },
                    'date_created': 'Thu, 30 Jul 2015 23:19:04 +0000',
                    'date_updated': 'Thu, 30 Jul 2015 23:19:04 +0000',
                    'emergency_status': 'Active',
                    'emergency_address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'friendly_name': '(808) 925-5327',
                    'identity_sid': 'RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'origin': 'origin',
                    'phone_number': '+18089255327',
                    'sid': 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                    'sms_application_sid': '',
                    'sms_fallback_method': 'POST',
                    'sms_fallback_url': '',
                    'sms_method': 'POST',
                    'sms_url': '',
                    'status_callback': '',
                    'status_callback_method': 'POST',
                    'trunk_sid': null,
                    'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json',
                    'voice_application_sid': '',
                    'voice_caller_id_lookup': false,
                    'voice_fallback_method': 'POST',
                    'voice_fallback_url': null,
                    'voice_method': 'POST',
                    'voice_url': null,
                    'bundle_sid': 'BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
                }
            ],
            'last_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1&Page=2',
            'next_page_uri': null,
            'num_pages': 3,
            'page': 0,
            'page_size': 1,
            'previous_page_uri': null,
            'start': 0,
            'total': 3,
            'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1'
        });
  
        holodeck.mock(new Response(200, body));
  
        var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                                      .incomingPhoneNumbers.list();
        promise.then(function(response) {
          expect(response).toBeDefined();
          done();
        }, function() {
          throw new Error('failed');
        }).done();
      }
    );
    it('should generate valid read_empty response',
      function(done) {
        var body = JSON.stringify({
            'end': 0,
            'first_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1&Page=0',
            'incoming_phone_numbers': [],
            'last_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1&Page=2',
            'next_page_uri': null,
            'num_pages': 3,
            'page': 0,
            'page_size': 1,
            'previous_page_uri': null,
            'start': 0,
            'total': 3,
            'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1'
        });
  
        holodeck.mock(new Response(200, body));
  
        var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                                      .incomingPhoneNumbers.list();
        promise.then(function(response) {
          expect(response).toBeDefined();
          done();
        }, function() {
          throw new Error('failed');
        }).done();
      }
    );
    it('should generate valid create request',
      function(done) {
        holodeck.mock(new Response(500, '{}'));
  
        var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                                      .incomingPhoneNumbers.create();
        promise.then(function() {
          throw new Error('failed');
        }, function(error) {
          expect(error.constructor).toBe(RestException.prototype.constructor);
          done();
        }).done();
  
        var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
        var url = `https://api.twilio.com/2010-04-01/Accounts/${accountSid}/IncomingPhoneNumbers.json`;
  
        holodeck.assertHasRequest(new Request({
          method: 'POST',
          url: url
        }));
      }
    );
    it('should generate valid create response',
      function(done) {
        var body = JSON.stringify({
            'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'address_requirements': 'none',
            'address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'api_version': '2010-04-01',
            'beta': false,
            'capabilities': {
                'mms': true,
                'sms': false,
                'voice': true
            },
            'date_created': 'Thu, 30 Jul 2015 23:19:04 +0000',
            'date_updated': 'Thu, 30 Jul 2015 23:19:04 +0000',
            'emergency_status': 'Active',
            'emergency_address_sid': 'ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'friendly_name': '(808) 925-5327',
            'identity_sid': 'RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'origin': 'origin',
            'phone_number': '+18089255327',
            'sid': 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
            'sms_application_sid': '',
            'sms_fallback_method': 'POST',
            'sms_fallback_url': '',
            'sms_method': 'POST',
            'sms_url': '',
            'status_callback': '',
            'status_callback_method': 'POST',
            'trunk_sid': null,
            'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json',
            'voice_application_sid': '',
            'voice_caller_id_lookup': false,
            'voice_fallback_method': 'POST',
            'voice_fallback_url': null,
            'voice_method': 'POST',
            'voice_url': null,
            'bundle_sid': 'BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
        });
  
        holodeck.mock(new Response(201, body));
  
        var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                                      .incomingPhoneNumbers.create();
        promise.then(function(response) {
          expect(response).toBeDefined();
          done();
        }, function() {
          throw new Error('failed');
        }).done();
      }
    );
  });
  