ProxyBucketRegion implements Bucket { @Override public BucketAdvisor getBucketAdvisor() { return this.advisor; } ProxyBucketRegion(int bid, PartitionedRegion partitionedRegion,
      InternalRegionArguments internalRegionArgs); @Override CancelCriterion getCancelCriterion(); void close(); @Override int getSerialNumber(); @Override DistributionManager getDistributionManager(); @Override DistributionAdvisor getDistributionAdvisor(); @Override CacheDistributionAdvisor getCacheDistributionAdvisor(); @Override Profile getProfile(); @Override DistributionAdvisee getParentAdvisee(); @Override PartitionedRegion getPartitionedRegion(); @Override InternalDistributedSystem getSystem(); @Override String getName(); @Override String getFullPath(); @Override InternalCache getCache(); @Override RegionAttributes getAttributes(); @Override BucketAdvisor getBucketAdvisor(); void setBucketRegion(BucketRegion br); void setHosting(boolean value); void removeBucket(); int getBucketRedundancy(); @Override boolean isPrimary(); BucketRegion getCreatedBucketRegion(); BucketRegion getHostedBucketRegion(); @Override boolean isHosting(); @Override void fillInProfile(Profile profile); ProxyBucketRegion initialize(); @Override Set<InternalDistributedMember> getBucketOwners(); int getBucketOwnersCount(); int getBucketId(); @Override int getId(); void setBucketSick(DistributedMember member, boolean sick); boolean isBucketSick(); Set<DistributedMember> getSickMembers(); void recoverFromDisk(); @Override BucketPersistenceAdvisor getPersistenceAdvisor(); @Override DiskRegion getDiskRegion(); BucketLock getBucketLock(); @Override void remoteRegionInitialized(CacheProfile profile); static final String NO_FIXED_PARTITION_NAME; }
@Test public void shouldBeMockable() throws Exception { ProxyBucketRegion mockProxyBucketRegion = mock(ProxyBucketRegion.class); BucketAdvisor mockBucketAdvisor = mock(BucketAdvisor.class); when(mockProxyBucketRegion.getBucketAdvisor()).thenReturn(mockBucketAdvisor); assertThat(mockProxyBucketRegion.getBucketAdvisor()).isSameAs(mockBucketAdvisor); }