@Test
public void testExtractTransactionContext() {

  TransactionContext result = transactionContextHelper.extractTransactionContext(new Object[] {txContextProperties});
  assertThat(result.globalTxId(), is(transactionGlobalTxId));
  assertThat(result.localTxId(), is(transactionLocalTxId));
  result = transactionContextHelper.extractTransactionContext(new Object[] {});
  assertNull(result);
  result = transactionContextHelper.extractTransactionContext(null);
  assertNull(result);
  result = transactionContextHelper.extractTransactionContext(new Object[] {txContext});
  assertThat(result, is(txContext));
  TransactionContext otherTx = Mockito.mock(TransactionContext.class);
  result = transactionContextHelper.extractTransactionContext(new Object[] {otherTx, txContextProperties});
  assertThat(result, is(otherTx));
}