public void ShouldGetAllHandlers( [Frozen] Mock <IServiceProvider> services, MessageHandlerFactory sut) { var handlers = Fixture.CreateMany <IMessageHandler <TestMessage> >(); services.Setup(x => x.GetService(typeof(IEnumerable <IMessageHandler <TestMessage> >))) .Returns(handlers); var result = sut.GetHandlersFor <TestMessage>(); Assert.Equal(handlers, result); }