assert n.getPort() != -1 : n;
assert n.getStatus() != null : n;
assert !Arrays.asList(LoadBalancer.WEIGHTED_ALGORITHMS).contains(lb.getAlgorithm())
|| n.getWeight() != null : n;
Node getDetails = api.getNodeApiForZoneAndLoadBalancer(lb.getRegion(), lb.getId()).get(n.getId());
try {
assertEquals(getDetails.getId(), n.getId());
assertEquals(getDetails.getCondition(), n.getCondition());
assertEquals(getDetails.getAddress(), n.getAddress());
assertEquals(getDetails.getPort(), n.getPort());
assertEquals(getDetails.getStatus(), n.getStatus());
if (Arrays.asList(LoadBalancer.WEIGHTED_ALGORITHMS).contains(lb.getAlgorithm())) {
assertEquals(getDetails.getWeight(), n.getWeight());
}
} catch (AssertionError e) {
throw new AssertionError(String.format("%s\n%s - %s", e.getMessage(), getDetails, n));
}
}