public void TestGetAllFollowingId() { mockFollowRepository.Setup(x => x.GetAllFollowingId(It.IsAny <string>())).Returns(getAllFollowingId); var followService = new FollowService(mockFollowRepository.Object); List <string> getAllFollowingIds = followService.GetAllFollowingId("5d111299f3b75e0001f4ed78"); string followeingIdFirstActual = getAllFollowingIds.FirstOrDefault(); Assert.AreEqual(followeingIdFirstActual, "5d0a17701a0a4200017de6cv"); }