java - Unable to mock the findAll() method from JPA Repository with JMockit -


i have service implementation method getone makes call findbyid @ repository layer. (my repository extends jparepository, did not have implement findall myself.) have tried mock findall return new facility code below.

new mockup<facilityrepository>() {      @mock     public facility findbyid(int id) {         return new facility(1, new date(), "active");     } }; 

my issue when invoke getone service implementation, expected mock findall called , mock facility returned. doesn't , leaves me stumped. why isn't mock method being called?

very new jmockit, appreciated.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -