MoveBucketMessage extends PartitionMessage { @Override protected boolean operateOnPartitionedRegion(ClusterDistributionManager dm, PartitionedRegion region, long startTime) throws ForceReattemptException { PartitionedRegionDataStore dataStore = region.getDataStore(); boolean moved = dataStore.moveBucket(this.bucketId, this.source, true); region.getPrStats().endPartitionMessagesProcessing(startTime); MoveBucketReplyMessage.send(getSender(), getProcessorId(), dm, null, moved); return false; } MoveBucketMessage(); private  MoveBucketMessage(InternalDistributedMember recipient, int regionId,
      ReplyProcessor21 processor, int bucketId, InternalDistributedMember source);  MoveBucketMessage(DataInput in); static MoveBucketResponse send(InternalDistributedMember recipient,
      PartitionedRegion region, int bucketId, InternalDistributedMember source); @Override boolean isSevereAlertCompatible(); @Override int getDSFID(); @Override void fromData(DataInput in,
      DeserializationContext context); @Override void toData(DataOutput out,
      SerializationContext context);  }
@Test public void shouldBeMockable() throws Exception { MoveBucketMessage mockMoveBucketMessage = mock(MoveBucketMessage.class); ClusterDistributionManager mockDistributionManager = mock(ClusterDistributionManager.class); PartitionedRegion mockPartitionedRegion = mock(PartitionedRegion.class); long startTime = System.currentTimeMillis(); Object key = new Object(); when(mockMoveBucketMessage.operateOnPartitionedRegion(eq(mockDistributionManager), eq(mockPartitionedRegion), eq(startTime))).thenReturn(true); assertThat(mockMoveBucketMessage.operateOnPartitionedRegion(mockDistributionManager, mockPartitionedRegion, startTime)).isTrue(); }