public void Test_GetUserUnitInfoFromReferenceData_FirstRequest_With_EmptyLocationId()
        {
            var result = testCandidate.GetUserUnitInfoFromReferenceData("user1", Guid.Empty);

            Assert.IsNotNull(result.Result);
            Assert.AreEqual(result.Result.UnitName, "Type1");
            Assert.AreEqual(result.Result.UnitType, "Type1");
            Assert.AreEqual(result.Result.LocationId, new Guid("FFD741D9-5BBE-4D7F-9C3B-79D3588DC98A"));
        }
        /// <summary>
        /// This method fetches Unit information for which user has access
        /// </summary>
        /// <param name="userName">username</param>
        /// <param name="locationId">unit id</param>
        /// <returns>unit details</returns>
        public async Task <UserUnitInfoDTO> GetUserUnitInfo(string userName, Guid locationId)
        {
            string methodName = typeof(ActionManagerBusinessService) + "." + nameof(GetUserUnitInfo);

            using (loggingHelper.RMTraceManager.StartTrace("BusinessService.GetUserUnitInfo"))
            {
                loggingHelper.LogMethodEntry(methodName, priority, entryEventId);
                var userUnitDetails = await actionManagerDataService.GetUserUnitInfo(userName, locationId);

                // Get the Unit details from reference data if current user has access to the units above mail center
                if (userUnitDetails == null)
                {
                    userUnitDetails = await actionManagerDataService.GetUserUnitInfoFromReferenceData(userName, locationId);
                }

                // mapping dataDTO to public DTO
                UserUnitInfoDTO userUnitInfoDTO = GenericMapper.Map <UserUnitInfoDataDTO, UserUnitInfoDTO>(userUnitDetails);
                loggingHelper.LogMethodExit(methodName, priority, exitEventId);

                return(userUnitInfoDTO);
            }
        }