DropletCreation droplet = null;
try {
droplet = api.getDropletApi().create("eventtest", defaultImage.getId(), defaultSize.getId(),
defaultRegion.getId());
Event event = api.getEventApi().get(droplet.getEventId());
assertNotNull(event, "Droplet creation event should not be null");
assertTrue(event.getId() > 0, "Event id should be > 0");
} finally {
if (droplet != null) {
waitForEvent(droplet.getEventId());
api.getDropletApi().destroy(droplet.getId(), true);
}