Hello,
I’m stuck with writing the Junit for the below code, could you please help me on this.
@Bean
public void ExtClient() {
ExternalTaskClient client = ExternalTaskClient.create().baseUrl(baseUrl)
.addInterceptor(new NotificationClientRequestInterceptor()).asyncResponseTimeout(asyncTimeOut)
.workerId(workerId).maxTasks(maxTasks).build();
client.subscribe(topicName).lockDuration(100000L).handler((externalTask, externalTaskService) -> {
externalTaskService.complete(externalTask);
}).open();
public class NotificationClientRequestInterceptor implements ClientRequestInterceptor {
@Override
public void intercept(ClientRequestContext requestContext) {
requestContext.addHeader("AuthToken", tokenAccessor.getAccessToken());
}
}
I’m new to Camunda, can anyone please help me on this.