how to write test cases to verify jpa queries in repository code example Example: how to use jparepository in unit test @MockBean private YourRepository repository;