KubeClusterMembershipConnector implements ClusterMembershipConnector { @Override public ClusterMembershipRevision<ClusterMember> getLocalClusterMemberRevision() { return reconciler.getCurrent().getLocalMemberRevision(); } KubeClusterMembershipConnector(ClusterMember initial,
                                          KubeMembershipExecutor kubeMembershipExecutor,
                                          KubeLeaderElectionExecutor kubeLeaderElectionExecutor,
                                          KubeClusterMembershipConfiguration configuration,
                                          TitusRuntime titusRuntime); @PreDestroy void shutdown(); @Override ClusterMembershipRevision<ClusterMember> getLocalClusterMemberRevision(); @Override Map<String, ClusterMembershipRevision<ClusterMember>> getClusterMemberSiblings(); @Override ClusterMembershipRevision<ClusterMemberLeadership> getLocalLeadershipRevision(); @Override Optional<ClusterMembershipRevision<ClusterMemberLeadership>> findCurrentLeader(); @Override Mono<ClusterMembershipRevision<ClusterMember>> register(Function<ClusterMember, ClusterMembershipRevision<ClusterMember>> selfUpdate); @Override Mono<ClusterMembershipRevision<ClusterMember>> unregister(Function<ClusterMember, ClusterMembershipRevision<ClusterMember>> selfUpdate); @Override Mono<Void> joinLeadershipGroup(); @Override Mono<Boolean> leaveLeadershipGroup(boolean onlyNonLeader); @Override Flux<ClusterMembershipEvent> membershipChangeEvents();  }
@Test public void testRegistration() throws InterruptedException { long revision1 = connector.getLocalClusterMemberRevision().getRevision(); long revision2 = doRegister().getRevision(); long revision3 = doRegister().getRevision(); assertThat(revision2).isGreaterThan(revision1); assertThat(revision3).isGreaterThan(revision2); }