@Override
protected void validateNodesInLoadBalancer() {
ApiContext<ELBApi> elbContext = view.unwrap();
// TODO create a LoadBalancer object and an appropriate list method so that this
// does not have to be EC2 specific code
ELBApi elbApi = elbContext.getApi();
Builder<String> instanceIds = ImmutableSet.<String> builder();
for (NodeMetadata node : nodes) {
instanceIds.add(node.getProviderId());
}
FluentIterable<LoadBalancer> elbs = elbApi.getLoadBalancerApi().list().concat();
for (LoadBalancer elb : elbs) {
if (elb.getName().equals(group))
assertEquals(elb.getInstanceIds(), instanceIds.build());
}
}