api.getServerApi().destroy(serverId, DestroyServerOptions.Builder.discardIp());
super.tearDown();
}
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();
}
}, 30, 1, SECONDS);
assertTrue(result.apply(before + 1));
}