protected internal MessageBusService GetMessageBusService() { MessageBusService service = new MessageBusService(); service.GetType() .GetProperty("MessageBus", BindingFlags.Instance | BindingFlags.Public) .SetValue(service, new TestMessageBusService()); return(service); }