private Address getAddressFromLoadBalancer() { Address address = router.next(); if (address == null) { Set<Member> members = client.getCluster().getMembers(); String msg; if (members.isEmpty()) { msg = "No address was return by the LoadBalancer since there are no members in the cluster"; } else { msg = "No address was return by the LoadBalancer. " + "But the cluster contains the following members:" + members; } throw new IllegalStateException(msg); } return address; }