recordId = api(zoneName).addRecordToPoolWithTTLAndWeight(rdata, poolId, ttl, weight.get());
} else {
recordId = api(zoneName).addRecordToPoolWithTTL(rdata, poolId, ttl);
}
getAnonymousLogger().info("created " + type + " record: " + recordId);
TrafficControllerPoolRecordDetail record = checkPoolRecordConsistent(zoneName, getRecordById(recordId).get());
PoolRecordSpec recordSpec = checkPoolRecordSpec(api(zoneName).getRecordSpec(recordId));
assertEquals(record.getRecord(), TrafficControllerPoolRecord.create(type, rdata));
assertEquals(record.getWeight(), weight.or(2).intValue());
assertEquals(recordSpec.getTTL(), ttl);
return record;
}