Added support for overriding component definitions when stubbing for tests. Also added example.