.withProtocol(protocol)
.withTerm(3)
.withLeader("baz")
.withStateMachine(new TestStateMachine())
.withLog(new TestLog()
.withEntry(new ConfigurationEntry(1, new ClusterConfig()
.withLocalMember(new Member("foo"))
.withRemoteMembers(new Member("bar"), new Member("baz"), new Member("foobarbaz"))))
.withEntry(new OperationEntry(1, "foo", Arrays.asList("bar", "baz")))
.withEntry(new OperationEntry(1, "foo", Arrays.asList("bar", "baz")))
.withEntry(new OperationEntry(1, "foo", Arrays.asList("bar", "baz")))
.withEntry(new OperationEntry(2, "foo", Arrays.asList("bar", "baz")))
.withEntry(new OperationEntry(2, "foo", Arrays.asList("bar", "baz"))))
.withState(CopycatState.FOLLOWER)
.withCommitIndex(6)
.withLastApplied(6);
cluster.addNode(node1);
TestNode node2 = new TestNode()
.withCluster("bar", "foo", "baz", "foobarbaz")
.withProtocol(protocol)
.withTerm(3)
.withLeader("baz")
.withStateMachine(new TestStateMachine())
.withLog(new TestLog()
.withEntry(new ConfigurationEntry(1, new ClusterConfig()
.withLocalMember(new Member("bar"))
.withRemoteMembers(new Member("foo"), new Member("baz"), new Member("foobarbaz"))))
.withEntry(new OperationEntry(1, "foo", Arrays.asList("bar", "baz")))
.withEntry(new OperationEntry(1, "foo", Arrays.asList("bar", "baz")))
.withEntry(new OperationEntry(1, "foo", Arrays.asList("bar", "baz")))
.withEntry(new OperationEntry(2, "foo", Arrays.asList("bar", "baz")))
.withEntry(new OperationEntry(2, "foo", Arrays.asList("bar", "baz"))))
.withState(CopycatState.FOLLOWER)
.withCommitIndex(6)
.withLastApplied(6);
cluster.addNode(node2);
TestNode node3 = new TestNode()
.withCluster("baz", "bar", "foo", "foobarbaz")
.withProtocol(protocol)
.withTerm(3)
.withLeader("baz")
.withStateMachine(new TestStateMachine())
.withLog(new TestLog()
.withEntry(new ConfigurationEntry(1, new ClusterConfig()
.withLocalMember(new Member("baz"))
.withRemoteMembers(new Member("foo"), new Member("bar"), new Member("foobarbaz"))))
.withEntry(new OperationEntry(1, "foo", Arrays.asList("bar", "baz")))
.withEntry(new OperationEntry(1, "foo", Arrays.asList("bar", "baz")))
.withEntry(new OperationEntry(1, "foo", Arrays.asList("bar", "baz")))