public void ShouldReturnListOfUser() { var mockService = new Mock <ICreditCardService <BankUser> >(); mockService.Setup(x => x.GetListOfUsers()).Returns(ReturnListOfUser()); var hand = new BaseHandler <BankUser>(mockService.Object); Assert.AreEqual(hand.GetListOfUsers().Count, 2); hand.GetListOfUsers(); }