TXMessage extends SerialDistributionMessage implements MessageWithReply, TransactionMessage { @Override public InternalDistributedMember getMemberToMasqueradeAs() { if (txMemberId == null) { return getSender(); } return txMemberId; } TXMessage();  TXMessage(int txUniqueId, InternalDistributedMember onBehalfOfMember,
      ReplyProcessor21 processor); @Override boolean canStartRemoteTransaction(); @Override String toString(); void appendFields(StringBuffer buff); @Override int getTXUniqId(); @Override void toData(DataOutput out,
      SerializationContext context); @Override void fromData(DataInput in,
      DeserializationContext context); @Override InternalDistributedMember getMemberToMasqueradeAs(); @Override int getProcessorId(); @Override InternalDistributedMember getTXOriginatorClient(); @Override boolean canParticipateInTransaction(); @Override boolean isTransactionDistributed();  }
@Test public void shouldBeMockable() throws Exception { TXMessage mockTXMessage = mock(TXMessage.class); InternalDistributedMember mockInternalDistributedMember = mock(InternalDistributedMember.class); when(mockTXMessage.getMemberToMasqueradeAs()).thenReturn(mockInternalDistributedMember); assertThat(mockTXMessage.getMemberToMasqueradeAs()).isSameAs(mockInternalDistributedMember); }