Hello,
I have been using the org.camunda.bpm.engine.test* api for exercising my workflow. All was working well until I started adding execution and task listeners into my diagram. My tests now are raising null pointer exceptions because they can’t autowire my components.
Class header:
@SpringBootTest
public class WorkflowTest
POM:
<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<scope>test</scope>
</dependency>
Initially I thought this was more of a spring issue, but given my integration tests exercise components that use autowiring all over the place and it only appears to happen in listeners, I’m not quite sure.