Hey, can you provide some unit test showing your code and reproducing the issue.
You can check this test, for example:
https://github.com/calcacuervo/JBPM5-Samples/blob/master/human-tasks/src/test/java/com/test/HumanTaskTest.java
which uses process instance logs.
Check that you have instance logs classes added in persistence.xml, like this:
https://github.com/calcacuervo/JBPM5-Samples/blob/master/human-tasks/src/test/resources/META-INF/persistence.xml
Regards,
Demian