337338339340341342343344345346347
cluster.start(); node1.await().leaderElected(); int leaderCount = 0; for (TestNode node : cluster.nodes()) { if (node.instance().isLeader()) { leaderCount++; } }