}
protected void createDomain(String domain) {
final DomainApi domainApi = api.getDomainApi();
int before = domainApi.list().size();
domainApi.create(domain);
Predicate<Integer> result = retry(new Predicate<Integer>() {
public boolean apply(Integer value) {
return domainApi.list().size() == value.intValue();
}