So I started writing tests for our Java-Spring-project.
What I use is JUnit and Mockito. It\'s said, that when I use the when()...thenReturn() option I can mock ser
faced the same issue, the solution that worked for me:
Instead of mocking the service interface, I used @InjectMocks to mock the service implementation:
@InjectMocks private exampleServiceImpl exampleServiceMock;
instead of :
@Mock private exampleService exampleServiceMock;