public async Task ExecuteAsync_Should_Invoke_Mediator() { var mediator = Substitute.For <IMediator>(); var item = new Dummy { Name = "Test", Id = Guid.NewGuid() }; var scheduledJob = new ScheduledJob(_logger, mediator) { Item = item }; await scheduledJob.ExecuteAsync(); mediator.Received(1).Send(item, typeof(IMonitor <>)); }