Java - Mockito

From My Limbic Wiki

Annotations

  • @Mock: Mock an object. Doesn't allow to contact real methods implementations
  • @InjectMocks: Inject others mocks declared in the same test into this mock
  • @Spy: Mock an object. Allow to contact real methods implementations
  • @Captor: avoid warnings related capturing complex generic types.