Verify Calls
Called once, and only once
Mockito.verify(service, Mockito.times(1)).method(ArgumentMatchers.any());Called one or more times
Mockito.verify(service, Mockito.atLeastOnce()).method(ArgumentMatchers.any());Never Called
Mockito.verify(service, Mockito.never()).method(ArgumentMatchers.any());Called with a specific value
Mockito.verify(response, Mockito.atLeastOnce()).setContentType(
ArgumentMatchers.same(MediaType.APPLICATION_PDF_VALUE));Last updated
Was this helpful?