1 package org.onap.so.bpmn.infrastructure.pnf.delegate;
3 import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.*;
4 import org.camunda.bpm.engine.delegate.DelegateExecution;
5 import org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake;
9 public class PnfInputCheckersTestUtils {
11 static final String PNF_ENTRY_NOTIFICATION_TIMEOUT = "P1D";
12 static final String VALID_UUID = UUID.nameUUIDFromBytes("testUuid".getBytes()).toString();
13 static final String RESERVED_UUID = new UUID(0, 0).toString();
14 private static final String DEFAULT_SERVICE_INSTANCE_ID = "da7d07d9-b71c-4128-809d-2ec01c807169";
15 private static final String DEFAULT_PNF_CORRELATION_ID = "testPnfCorrelationId";
17 static class DelegateExecutionBuilder {
18 private String pnfCorrelationId = DEFAULT_PNF_CORRELATION_ID;
19 private String pnfUuid = VALID_UUID;
20 private String serviceInstanceId = DEFAULT_SERVICE_INSTANCE_ID;
22 public DelegateExecutionBuilder setPnfCorrelationId(String pnfCorrelationId) {
23 this.pnfCorrelationId = pnfCorrelationId;
27 public DelegateExecutionBuilder setPnfUuid(String pnfUuid) {
28 this.pnfUuid = pnfUuid;
32 public DelegateExecutionBuilder setServiceInstanceId(String serviceInstanceId) {
33 this.serviceInstanceId = serviceInstanceId;
37 public DelegateExecution build() {
38 DelegateExecution execution = new DelegateExecutionFake();
39 execution.setVariable("testProcessKey", "testProcessKeyValue");
40 execution.setVariable(PNF_CORRELATION_ID, this.pnfCorrelationId);
41 execution.setVariable(PNF_UUID, this.pnfUuid);
42 execution.setVariable(SERVICE_INSTANCE_ID, this.serviceInstanceId);