public void Get_ReturnsOkResult_WithTheListOfAllTheLeaves()
        {
            // Arrange
            var leaves = GetLeaves();
            // Mock the Repo
            var mockRepo = new Mock <ILeaveNotifierRepository>();

            mockRepo.Setup(repo => repo.GetAllLeaves()).Returns(leaves);

            // Mock the User
            var user = new LeaveNotifierUser()
            {
                UserName  = "******",
                FirstName = "Sudyok",
                LastName  = "Mati"
            };
            var mockUserManager = CommonMocks.GetUserManagerMock();

            mockUserManager.Setup(userMgr => userMgr.FindByNameAsync(user.UserName)).ReturnsAsync(user);

            // Mock the Logger
            var mockLogger = new Mock <ILogger <LeavesController> >();

            // Use real Mapper
            var mapperConfig = new MapperConfiguration(cfg => {
                cfg.AddProfile(new LeaveMappingProfile());
            });
            var mapper = mapperConfig.CreateMapper();

            // Initialize the controller
            var controller = new LeavesController(mockRepo.Object, mockUserManager.Object, mockLogger.Object, mapper);

            // Act
            var query  = new QueryModel <Leave>();
            var result = controller.Get(query);

            // Assert
            var okResult = Assert.IsType <OkObjectResult>(result);
            var model    = Assert.IsAssignableFrom <IEnumerable <LeaveModel> >(okResult.Value);

            Assert.Equal(2, model.Count());
        }