How to Mock Variables for Interfaces and Casts in Java
One common issue when writing JUnit tests is how to create a mock when the variable is an an interface / implementation or a casting. For example, in the case of casting: The variable processor is casted to SomeOtherProcessor. That’s why when you create a mock with it, you have to cover both SomePaymentProcessor and… read more »