MemberFunctionStreamingMessage extends DistributionMessage implements TransactionMessage, MessageWithReply { @Override public InternalDistributedMember getMemberToMasqueradeAs() { if (txMemberId == null) { return getSender(); } else { return txMemberId; } } MemberFunctionStreamingMessage();  MemberFunctionStreamingMessage(Function function, int procId, Object ar,
      boolean isFnSerializationReqd, boolean isReExecute);  MemberFunctionStreamingMessage(Function function, int procId, Object ar,
      boolean isFnSerializationReqd, Set<String> regions, boolean isReExecute);  MemberFunctionStreamingMessage(DataInput in); @Override int getProcessorId(); @Override int getDSFID(); @Override void fromData(DataInput in,
      DeserializationContext context); @Override void toData(DataOutput out,
      SerializationContext context); synchronized boolean sendReplyForOneResult(DistributionManager dm, Object oneResult,
      boolean lastResult, boolean sendResultsInOrder); @Override int getProcessorType(); @Override boolean canStartRemoteTransaction(); @Override int getTXUniqId(); @Override InternalDistributedMember getMemberToMasqueradeAs(); @Override InternalDistributedMember getTXOriginatorClient(); @Override boolean canParticipateInTransaction(); @Override boolean isTransactionDistributed();  }
@Test public void shouldBeMockable() throws Exception { MemberFunctionStreamingMessage mockMemberFunctionStreamingMessage = mock(MemberFunctionStreamingMessage.class); InternalDistributedMember mockInternalDistributedMember = mock(InternalDistributedMember.class); when(mockMemberFunctionStreamingMessage.getMemberToMasqueradeAs()) .thenReturn(mockInternalDistributedMember); assertThat(mockMemberFunctionStreamingMessage.getMemberToMasqueradeAs()) .isSameAs(mockInternalDistributedMember); }