public async void Get_ShouldReturnNullBecauseRecordNotFound() { var mock = new ServiceMockFacade <ICallService, ICallRepository>(); mock.RepositoryMock.Setup(x => x.Get(It.IsAny <int>())).Returns(Task.FromResult <Call>(null)); var service = new CallService(mock.LoggerMock.Object, mock.MediatorMock.Object, mock.RepositoryMock.Object, mock.ModelValidatorMockFactory.CallModelValidatorMock.Object, mock.DALMapperMockFactory.DALCallMapperMock, mock.DALMapperMockFactory.DALCallAssignmentMapperMock, mock.DALMapperMockFactory.DALNoteMapperMock); ApiCallServerResponseModel response = await service.Get(default(int)); response.Should().BeNull(); mock.RepositoryMock.Verify(x => x.Get(It.IsAny <int>())); }