Chuck Greb
1 min readJun 19, 2017

--

Nice catch. There was indeed an IllegalArgumentException thrown but it was by the mocking framework and not the production code under test.

Perhaps there is a better solution using reflection and/or Whitebox.setInternalState(...) but I have not found it yet. It’s also possible this is not testable after all given the way the compiler inlines static final fields.

--

--

Chuck Greb
Chuck Greb

Written by Chuck Greb

Mission-driven engineering leader. Community organizer. Digital minimalist.

No responses yet