public void CreateTroubleshooterCategory() { var troubleshooterCategoryRequest = new TroubleshooterCategoryRequest { Title = "TitleCategory", CategoryType = TroubleshooterCategoryType.Private, StaffId = 2, DisplayOrder = 1, Description = "Description", UserVisibilityCustom = true, UserGroupIdList = new [] { 1, 2, 3 }, StaffVisibilityCustom = true, StaffGroupIdList = new [] { 3, 4, 5 } }; const string apiMethod = "/Troubleshooter/Category"; const string parameters = "title=TitleCategory&categorytype=3&staffid=2&displayorder=1&description=Description&uservisibilitycustom=1&usergroupidlist=1,2,3&staffvisibilitycustom=1&staffgroupidlist=3,4,5"; _kayakoApiRequest.Setup(x => x.ExecutePost <TroubleshooterCategoryCollection>(apiMethod, parameters)).Returns(_responseTroubleshooterCategoryCollection); var troubleshooterCategory = _troubleshooterController.CreateTroubleshooterCategory(troubleshooterCategoryRequest); _kayakoApiRequest.Verify(x => x.ExecutePost <TroubleshooterCategoryCollection>(apiMethod, parameters), Times.Once()); Assert.That(troubleshooterCategory, Is.EqualTo(_responseTroubleshooterCategoryCollection.FirstOrDefault())); }