This is a sample how to use mocks in a junit test class:
WeiterlesenSchlagwort: service
Mocking a Spring service with Mockito for a JUnit test
First define the bean to be mocked in your XML like this Then you can inject it into other beans
Weiterlesen