assertThatThrownBy(() -> testedObject.execute(delegateExecution)).isInstanceOf(BpmnError.class);
}
+ @Test
+ public void shouldThrowException_whenPnfIdIsEmptyString() throws Exception {
+ // given
+ PnfCheckInputs testedObject = new PnfCheckInputs(DEFAULT_TIMEOUT);
+ DelegateExecution delegateExecution = mockDelegateExecution();
+ when(delegateExecution.getVariable(CORRELATION_ID)).thenReturn("");
+ // when, then
+ assertThatThrownBy(() -> testedObject.execute(delegateExecution)).isInstanceOf(BpmnError.class);
+ }
+
private DelegateExecution mockDelegateExecutionWithCorrelationId() {
+ new PnfCheckInputs(DEFAULT_TIMEOUT);
DelegateExecution delegateExecution = mockDelegateExecution();
when(delegateExecution.getVariable(CORRELATION_ID)).thenReturn("testCorrelationId");
return delegateExecution;
// then
verify(delegateExecution).setVariable(eq(TIMEOUT_FOR_NOTIFICATION), eq(DEFAULT_TIMEOUT));
}
--}
++}