Hello,
I'd like to inject a RandomBase into my DoFn class in order to be able to provide mocks during testing.
I've written my own constructor to take the RandomBase* as an arg.
When the arg is null it builds its own MTRandom - this is the production path.
i also updated DecodeState() to call this constructor with the nullptr arg (I encode another string value in this stateful function).
In my test however I provide the DoFn with a non-null mock but because of the deferred evaluation it chooses to discard (encode) this object and decode it later without my RandomBase, essentially taking the prod path.
Is there a way I can solve this or at least make Flume not defer the use of my initial DoFn object that has my mock?
thanks,
C>T>