in my bpmn process, I like to mock a send task. The send task uses a java-delegate to send a mail. To distinguish several send tasks, I inject a constant value into the task (Field injection).
To test the process within a unit test, i do the following steps:
//registers mocks for all delegateExpressions
//registers a FluentJavaDelegateMock for the send task
Job processJob = getProcessJob();
Then, I receive the following error:
org.camunda.bpm.engine.exception.NullValueException: Field definition uses unexisting field ‘mailName’ on class org.camunda.bpm.extension.mockito.mock.FluentJavaDelegateMock: field is null
This shows that the field injection was not mocked correctly.
Could somebody please help me to address this issue?