As seen on the image, I verified for a specific action, and then also verified that no other methods were called for the mocks, including the emailService. The code checks say that there need to be verifications for all of the possible methods in the emailService, which was done. The answer provided does this by checking each method individually with times(1) or never().
My answer should also be a valid way to check methods called.
As seen on the image, I verified for a specific action, and then also verified that no other methods were called for the mocks, including the emailService. The code checks say that there need to be verifications for all of the possible methods in the emailService, which was done. The answer provided does this by checking each method individually with times(1) or never(). My answer should also be a valid way to check methods called.