use of com.woorea.openstack.nova.model.Server in project AJSC by att.
the class TestOpenstackServerMapping method testMapJsonToServer.
@Test
public void testMapJsonToServer() throws JsonParseException, JsonMappingException, IOException {
Server server = om.readValue(json, Server.class);
assertNotNull(server);
Server.Addresses addresses = server.getAddresses();
assertNotNull(addresses);
Map<String, List<Server.Addresses.Address>> map = addresses.getAddresses();
assertNotNull(map);
assertFalse(map.isEmpty());
assertEquals(1, map.size());
List<Server.Addresses.Address> list = map.get("VLAN_OVERLAY_422");
assertNotNull(list);
assertFalse(list.isEmpty());
Server.Addresses.Address entry = list.get(0);
assertNotNull(entry);
assertEquals("135.144.122.121", entry.getAddr());
}