In order to test my program I need to mock a method call like:
entityManager.createQuery("SELECT...", Integer.class).getSingleResult()
the createQuery
part returns a TypedQuery<Integer>
, but I actually just want to return a single integer: 1.
Currently I am using Mockito in order to create my mocks and I am pretty new to this.
Is there a way of testing this?
Thank you!