}
catch (KeeperException.NodeExistsException e) {
// ignore
}
ContainerAttributes containerAttributes = new ContainerAttributes(id).setPid(pid).setHost(host).setIp(ip);
containerAttributes.put("groups", "g1,g2,g3");
Container entity = new Container(id, containerAttributes);
Container savedContainer = containerRepository.save(entity);
assertNotNull(savedContainer);
ContainerAttributes savedAttributes = savedContainer.getAttributes();
assertEquals(id, savedAttributes.getId());
assertEquals(pid, savedAttributes.getPid());
assertEquals(host, savedAttributes.getHost());
assertEquals(ip, savedAttributes.getIp());
assertEquals(groups, savedAttributes.getGroups());
containerAttributes = new ContainerAttributes(id2).setPid(pid).setHost(host).setIp(ip);
entity = new Container(id2, containerAttributes);
savedContainer = containerRepository.save(entity);
assertNotNull(savedContainer);
assertSavedContainer(id2, containerAttributes);
}