public void Setup()
 {
     _telephoneNumberController =
         ControllerHelper.GetInitialisedTelephoneNumberController(_mockTelephoneNumberService.Object);
     AutoMapperConfig.Bootstrap();
 }
        public static TelephoneNumberController GetInitialisedTelephoneNumberController(ITelephoneNumberService telephoneNumberService)
        {
            var controller = new TelephoneNumberController(telephoneNumberService)
            {
                Request = new HttpRequestMessage { RequestUri = new Uri(Url) },
                Configuration = new HttpConfiguration()
            };

            controller.Configuration.MapHttpAttributeRoutes();
            controller.Configuration.EnsureInitialized();

            return controller;
        }