it looks like this is a closure, but it would be nice to have a way to get access to the policies on a wrapped policy. This however also seems naughty... my reasoning though is that I would like to check in unit tests that a new retry is being returned by my method that creates the policy in the first place, and that the other policies are singletons. I'd be ok with it requiring you to poke the internals a little by accessing it via an object key. I also understand if you can't/don't want to do this.
it looks like this is a closure, but it would be nice to have a way to get access to the policies on a wrapped policy. This however also seems naughty... my reasoning though is that I would like to check in unit tests that a new retry is being returned by my method that creates the policy in the first place, and that the other policies are singletons. I'd be ok with it requiring you to poke the internals a little by accessing it via an object key. I also understand if you can't/don't want to do this.