public void FromResponseDataTest()
        {
            var departmentRequest = new DepartmentRequest
            {
                Id = 2,
                DisplayOrder = 2,
                Module = DepartmentModule.LiveChat,
                ParentDepartmentId = 2,
                Title = "Title",
                Type = DepartmentType.Private,
                UserGroups = new List<int>(),
                UserVisibilityCustom = false
            };

            var department = new Department
                {
                    Id = 2,
                    DisplayOrder = 2,
                    Module = DepartmentModule.LiveChat,
                    ParentDepartmentId = 2,
                    Title = "Title",
                    Type = DepartmentType.Private,
                    UserGroups = new List<int>(),
                    UserVisibilityCustom = false
                };

            var departmentRequestResult = DepartmentRequest.FromResponseData(department);

            AssertUtility.ObjectsEqual(departmentRequest, departmentRequestResult);
        }
        private void CompareDepartments(Department one, Department two)
        {
            Assert.AreEqual(one.Id, two.Id);
            Assert.AreEqual(one.Title, two.Title);
            Assert.AreEqual(one.Type, two.Type);
            Assert.AreEqual(one.Module, two.Module);
            Assert.AreEqual(one.ParentDepartmentId, two.ParentDepartmentId);
            Assert.AreEqual(one.DisplayOrder, two.DisplayOrder);
            Assert.AreEqual(one.UserVisibilityCustom, two.UserVisibilityCustom);
            Assert.AreEqual(one.UserGroups, two.UserGroups);

            AssertObjectXmlEqual<Department>(one, two);
        }
		public static DepartmentRequest FromResponseData(Department responseData)
		{
			return DepartmentRequest.FromResponseType<Department, DepartmentRequest>(responseData);
		}