}
catch (KeeperException.NodeExistsException e) {
// ignore
}
AdminAttributes adminAttributes = new AdminAttributes(id).setPid(pid).setHost(host).setIp(ip);
Admin entity = new Admin(id, adminAttributes);
Admin savedAdmin = adminRepository.save(entity);
assertNotNull(savedAdmin);
AdminAttributes savedAttributes = savedAdmin.getAttributes();
assertEquals(id, savedAttributes.getId());
assertEquals(pid, savedAttributes.getPid());
assertEquals(host, savedAttributes.getHost());
assertEquals(ip, savedAttributes.getIp());
adminAttributes = new AdminAttributes(id2).setPid(pid).setHost(host).setIp(ip);
entity = new Admin(id2, adminAttributes);
savedAdmin = adminRepository.save(entity);
assertNotNull(savedAdmin);
assertSavedAdmin(id2, adminAttributes);
}