@Test
public void setUpOmegaContextInTransactionRequest() {

  when(invocation.getAttachment(OmegaContext.GLOBAL_TX_ID_KEY)).thenReturn(globalTxId);
  when(invocation.getAttachment(OmegaContext.LOCAL_TX_ID_KEY)).thenReturn(localTxId);
  doAnswer(new Answer<Void>() {
    // Just verify the context setting
    @Override
    public Void answer(InvocationOnMock invocation) throws Throwable {
      assertThat(omegaContext.globalTxId(), is(globalTxId));
      assertThat(omegaContext.localTxId(), is(localTxId));
      return null;
    }
  }).when(invoker).invoke(invocation);
  filter.invoke(invoker, invocation);
  assertThat(omegaContext.globalTxId(), is(nullValue()));
  assertThat(omegaContext.localTxId(), is(nullValue()));
}