I have a Quarkus project where all the unit tests are written in JUnit5 and using Mockito to stub out repository methods.
However, there is a push to replace the use of repository methods with calls made directly to the PanacheEntity class (where possible). Static calls such as
MyAwesomeEntity.findById(Object id)
Rather than having a repository like
public class MyAwesomeEntityRepository implements PanacheRepository<MyAwesomeEntity> { }
which was trivial to stub out with Mockito.
Is there a good way to mock the PanacheEntity methods for certain entities without having to replace use of Mockito for mocking repositories and services elsewhere in the same test?