use of org.activiti.api.runtime.model.impl.MessageSubscriptionImpl in project Activiti by Activiti.
the class MessageSubscriptionConverterTest method convertShouldReturnBPMNMessage.
@Test
public void convertShouldReturnBPMNMessage() {
MessageEventSubscriptionEntity entity = mock(MessageEventSubscriptionEntity.class);
given(entity.getConfiguration()).willReturn("correlationKey");
given(entity.getEventName()).willReturn("messageName");
given(entity.getProcessDefinitionId()).willReturn("procDefId");
given(entity.getProcessInstanceId()).willReturn("procInstId");
MessageSubscriptionImpl messageSubscription = converter.convertToMessageSubscription(entity);
// then
assertThat(messageSubscription).isNotNull();
assertThat(messageSubscription.getProcessInstanceId()).isEqualTo("procInstId");
assertThat(messageSubscription.getProcessDefinitionId()).isEqualTo("procDefId");
assertThat(messageSubscription.getConfiguration()).isEqualTo("correlationKey");
assertThat(messageSubscription.getEventName()).isEqualTo("messageName");
}
Aggregations