### Question:
ProcessStartedEventConverter extends BaseEventToEntityConverter { @Override protected ProcessStartedAuditEventEntity createEventEntity(CloudRuntimeEvent cloudRuntimeEvent) { return new ProcessStartedAuditEventEntity((CloudProcessStartedEvent) cloudRuntimeEvent); } ProcessStartedEventConverter(EventContextInfoAppender eventContextInfoAppender); @Override String getSupportedEvent();  }### Answer:
@Test public void createEventEntityShouldSetAllNonProcessContextRelatedFields() { CloudProcessStartedEventImpl event = buildProcessStartedEvent(); ProcessStartedAuditEventEntity auditEventEntity = eventConverter.createEventEntity(event); assertThat(auditEventEntity).isNotNull(); assertThat(auditEventEntity.getEventId()).isEqualTo(event.getId()); assertThat(auditEventEntity.getTimestamp()).isEqualTo(event.getTimestamp()); assertThat(auditEventEntity.getAppName()).isEqualTo(event.getAppName()); assertThat(auditEventEntity.getAppVersion()).isEqualTo(event.getAppVersion()); assertThat(auditEventEntity.getServiceName()).isEqualTo(event.getServiceName()); assertThat(auditEventEntity.getServiceFullName()).isEqualTo(event.getServiceFullName()); assertThat(auditEventEntity.getServiceType()).isEqualTo(event.getServiceType()); assertThat(auditEventEntity.getServiceVersion()).isEqualTo(event.getServiceVersion()); assertThat(auditEventEntity.getMessageId()).isEqualTo(event.getMessageId()); assertThat(auditEventEntity.getSequenceNumber()).isEqualTo(event.getSequenceNumber()); assertThat(auditEventEntity.getProcessInstance()).isEqualTo(event.getEntity()); }
@Test public void convertToEntityShouldReturnCreatedEntity() { ProcessStartedAuditEventEntity auditEventEntity = new ProcessStartedAuditEventEntity(); CloudProcessStartedEventImpl cloudRuntimeEvent = new CloudProcessStartedEventImpl(); doReturn(auditEventEntity).when(eventConverter).createEventEntity(cloudRuntimeEvent); AuditEventEntity convertedEntity = eventConverter.convertToEntity(cloudRuntimeEvent); assertThat(convertedEntity).isEqualTo(auditEventEntity); }