### Question:
TransactionContextHelper { protected void populateOmegaContext(OmegaContext context, TransactionContext transactionContext) { if (context.globalTxId() != null) { getLogger() .warn("The context {}'s globalTxId is not empty. Update it for globalTxId:{} and localTxId:{}", context, transactionContext.globalTxId(), transactionContext.localTxId()); } else { getLogger() .debug("Updated context {} for globalTxId:{} and localTxId:{}", context, transactionContext.globalTxId(), transactionContext.localTxId()); } context.setGlobalTxId(transactionContext.globalTxId()); context.setLocalTxId(transactionContext.localTxId()); }    }### Answer:
@Test public void testPopulateOmegaContextWhenItsEmpty() { OmegaContext omegaContext = new OmegaContext(null); transactionContextHelper.populateOmegaContext(omegaContext, txContext); assertEquals(transactionGlobalTxId, omegaContext.globalTxId()); assertEquals(transactionLocalTxId, omegaContext.localTxId()); }
@Test public void testPopulateOmegaContextWhenItsNotEmpty() { OmegaContext omegaContext = new OmegaContext(null); omegaContext.setGlobalTxId("global-tx-id"); omegaContext.setLocalTxId("local-tx-id"); transactionContextHelper.populateOmegaContext(omegaContext, txContext); assertEquals(transactionGlobalTxId, omegaContext.globalTxId()); assertEquals(transactionLocalTxId, omegaContext.localTxId()); }