private DirectionalPoolRecordDetail checkRecordConsistent(String dname, String recordId,
DirectionalPoolRecord record, DirectionalGroup group) {
DirectionalPoolRecordDetail recordDetail = getRecordByDNameAndId(dname, recordId).get();
checkDirectionalRecordDetail(recordDetail);
IdAndName rGroup = recordDetail.getGeolocationGroup().get();
assertEquals(rGroup.getName(), group.getName());
// TODO: look up each key with all and do a comparison
if (!group.containsValue("all"))
assertEquals(groupApi().get(rGroup.getId()), group);
assertFalse(recordDetail.getGroup().isPresent());
assertFalse(recordDetail.getSourceIpGroup().isPresent());
assertEquals(recordDetail.getName(), dname);
assertEquals(recordDetail.getZoneName(), zoneName);
assertEquals(recordDetail.getRecord(), record);