This is how you supposed to inject dependencies for your NServiceBus handler to test it:
Test.Handler<YourMessageHandler>()
.WithExternalDependencies(h => h.Dependency = yourObj)
(http://nservicebus.com/UnitTesting.aspx)
However it means my Dependency object reference should be public that I do not like a much. Is any way to keep it private readonly and assign it inside constructor, so that implementation supposed to be passed through the handler constructor only?
Thanks