@Test
public void testLogFormatting() throws Exception {

    Job previousJob = createJob();
    Job currentJob = previousJob.toBuilder().withStatus(JobStatus.newBuilder().withState(JobState.Finished).build()).build();
    ModelActionHolder modelActionHolder = ModelActionHolder.reference(
            TitusModelAction.newModelUpdate("testModelAction")
                    .job(previousJob)
                    .trigger(Trigger.API)
                    .summary("Job model update")
                    .jobUpdate(jobHolder -> jobHolder.setEntity(currentJob))
    );
    TitusChangeAction changeAction = TitusChangeAction.newAction("testChangeAction")
            .job(previousJob)
            .trigger(Trigger.API)
            .summary("Job update")
            .applyModelUpdate(self -> modelActionHolder);
    JobManagerReconcilerEvent jobReconcilerEvent = new JobModelUpdateReconcilerEvent(
            previousJob,
            changeAction,
            modelActionHolder,
            EntityHolder.newRoot(currentJob.getId(), currentJob),
            Optional.of(EntityHolder.newRoot(previousJob.getId(), previousJob)),
            "1",
            CallMetadata.newBuilder().withCallerId("LoggerTest").withCallReason("Testing logger transaction").build()
    );
    String logLine = JobTransactionLogger.doFormat(jobReconcilerEvent);
    assertThat(logLine).isNotEmpty();
    logger.info("Job event: {}", logLine);
}