member = new Member("service1", "cluster1", "np1", "p1", "m3");
member.setStatus(MemberStatus.Activated);
members.add(member);
RoundRobin algorithm = new RoundRobin();
algorithm.setMembers(members);
AlgorithmContext algorithmContext = new AlgorithmContext("service1", "cluster1");
Member nextMember = algorithm.getNextMember(algorithmContext);
Assert.assertEquals("Expected member not found", true, "m1".equals(nextMember.getMemberId()));
nextMember = algorithm.getNextMember(algorithmContext);
Assert.assertEquals("Expected member not found", true, "m2".equals(nextMember.getMemberId()));
nextMember = algorithm.getNextMember(algorithmContext);
Assert.assertEquals("Expected member not found", true, "m3".equals(nextMember.getMemberId()));
nextMember = algorithm.getNextMember(algorithmContext);
Assert.assertEquals("Expected member not found", true, "m1".equals(nextMember.getMemberId()));
}