private ChartController GetTestableChartController() { _userService.Setup(u => u.Execute("test")).Returns(_defaultUser); var controller = new ChartController(_userService.Object, _chartDataService.Object, _serviceLocator.Object); controller.SetFakeControllerContext(); controller.SetUserIdentity(new MileageStatsIdentity(_defaultUser.AuthorizationId, _defaultUser.DisplayName, _defaultUser.UserId)); return(controller); }