public void TestGetAllFollowerId() { mockFollowRepository.Setup(x => x.GetAllFollowerId(It.IsAny <string>())).Returns(getAllFollowerId); var followService = new FollowService(mockFollowRepository.Object); List <string> getAllFollowerIds = followService.GetAllFollowerId("5d111299f3b75e0001f4ed78"); string followerIdFirstActual = getAllFollowerIds.FirstOrDefault(); Assert.AreEqual(followerIdFirstActual, "5d0a17701a0a4200017de6c7"); }