Mocking static method calls

JAVING
1 min readJun 15, 2020

--

Jackie Chan’s reaction when he learned to mock static method calls.

Very simple example on how we can use method delegation to enable unit testing where there is a dependency to an static method call.

--

--

JAVING
JAVING

Written by JAVING

The present continuous form of “to program in Java”.

No responses yet