### Question:
MockEntityService { @Transactional public MockEntity save(MockEntity entity) { return repository.save(entity); } MockEntityService(MockEntityRepository repository); @Transactional MockEntity save(MockEntity entity);  }### Answer:
@Test public void should_inject_mock() { final MockEntity entity = new MockEntity(); mockEntityService.save(entity); Mockito .verify(mockEntityRepository) .save(entity); }