DistributionAdvisor { protected void initialize() { getDistributionManager().addMembershipListener(membershipListener); } protected  DistributionAdvisor(DistributionAdvisee advisee); boolean shouldSyncForCrashedMember(InternalDistributedMember id); void syncForCrashedMember(final InternalDistributedMember id, final Profile profile); DistributedRegion getRegionForDeltaGII(); static int createSerialNumber(); DistributionManager getDistributionManager(); DistributionAdvisee getAdvisee(); void close(); Set<InternalDistributedMember> addMembershipListenerAndAdviseGeneric(
      MembershipListener listener); void addMembershipListener(MembershipListener listener); void setInitializationListener(InitializationListener listener); boolean addProfileChangeListener(ProfileListener listener); void removeProfileChangeListener(ProfileListener listener); boolean removeMembershipListener(MembershipListener listener); void setInitialized(); boolean initializationGate(); boolean isInitialized(); boolean pollIsInitialized(); void dumpProfiles(String infoMsg); boolean putProfile(Profile profile); synchronized boolean putProfile(Profile newProfile, boolean forceProfile); static boolean isNewerSerialNumber(int newSerialNumber, int oldSerialNumber); void forceNewMembershipVersion(); long startOperation(); void endOperation(long version); void waitForCurrentOperations(); boolean removeId(final ProfileId memberId, boolean crashed, boolean destroyed,
      boolean fromMembershipListener); boolean removeIdWithSerial(InternalDistributedMember memberId, int serialNum,
      boolean regionDestroyed); synchronized boolean containsId(InternalDistributedMember memberId); synchronized int getNumProfiles(); Profile getProfile(ProfileId id); void exchangeProfiles(); Profile createProfile(); Set<InternalDistributedMember> adviseGeneric(); Set adviseProfileExchange(); boolean useAdminMembersForDefault(); boolean accept(ProfileVisitor<T> visitor, T aggregate); Set<InternalDistributedMember> adviseProfileUpdate(); Set<InternalDistributedMember> adviseProfileRemove(); static final int ILLEGAL_SERIAL; }
@Test public void shouldBeMockable() throws Exception { DistributionAdvisor mockDistributionAdvisor = mock(DistributionAdvisor.class); mockDistributionAdvisor.initialize(); verify(mockDistributionAdvisor, times(1)).initialize(); }