Parameterized tests with Junit2021-08-16 JUnit TestingParameterized tests help you to reduce the amount of testing code you need for test cases that only need different input and or output.
Mockito using thenReturn and thenAnswer2021-07-05 Mockito TestingBoth methods let you decide what a mocked object returns. thenReturn() returns a fixed value while thenAnswer() lets you use the parameters to determine a return value.