BucketOperatorImpl implements BucketOperator { @Override public boolean moveBucket(InternalDistributedMember source, InternalDistributedMember target, int bucketId, Map<String, Long> colocatedRegionBytes) { InternalResourceManager.getResourceObserver().movingBucket(rebalanceOp.getLeaderRegion(), bucketId, source, target); return rebalanceOp.moveBucketForRegion(source, target, bucketId); } BucketOperatorImpl(PartitionedRegionRebalanceOp rebalanceOp); @Override boolean moveBucket(InternalDistributedMember source, InternalDistributedMember target,
      int bucketId, Map<String, Long> colocatedRegionBytes); @Override boolean movePrimary(InternalDistributedMember source, InternalDistributedMember target,
      int bucketId); @Override void createRedundantBucket(InternalDistributedMember targetMember, int bucketId,
      Map<String, Long> colocatedRegionBytes, Completion completion); @Override void waitForOperations(); @Override boolean removeBucket(InternalDistributedMember targetMember, int bucketId,
      Map<String, Long> colocatedRegionBytes);  }
@Test public void moveBucketShouldDelegateToParRegRebalanceOpMoveBucketForRegion() throws UnknownHostException { doReturn(true).when(rebalanceOp).moveBucketForRegion(sourceMember, targetMember, bucketId); operator.moveBucket(sourceMember, targetMember, bucketId, colocatedRegionBytes); verify(resourceObserver, times(1)).movingBucket(region, bucketId, sourceMember, targetMember); verify(rebalanceOp, times(1)).moveBucketForRegion(sourceMember, targetMember, bucketId); }