use of org.onap.so.client.grm.beans.ServiceEndPoint in project so by onap.
the class ServiceEndPointListTest method testUnmarshallServiceEndpointListStartsWithUppercase.
@Test
public void testUnmarshallServiceEndpointListStartsWithUppercase() throws Exception {
String endpointsJson = getFileContentsAsString("__files/grm/endpoints2.json");
ServiceEndPointList sel = mapper.readValue(endpointsJson, ServiceEndPointList.class);
List<ServiceEndPoint> list = sel.getServiceEndPointList();
ServiceEndPoint se = list.get(0);
assertEquals(3, list.size());
assertEquals("dummy.pod.ns.dummy-pod3", se.getName());
assertEquals(Integer.valueOf(1), Integer.valueOf(se.getVersion().getMajor()));
assertEquals(Integer.valueOf(0), Integer.valueOf(se.getVersion().getMinor()));
assertEquals(Integer.valueOf(0), Integer.valueOf(se.getVersion().getPatch()));
assertEquals("192.168.120.218", se.getHostAddress());
assertEquals("32004", se.getListenPort());
assertEquals("37.7022", se.getLatitude());
assertEquals("121.9358", se.getLongitude());
assertEquals("/", se.getContextPath());
assertEquals("edge", se.getOperationalInfo().getCreatedBy());
assertEquals("edge", se.getOperationalInfo().getUpdatedBy());
assertEquals("Environment", se.getProperties().get(0).getName());
assertEquals("DEV", se.getProperties().get(0).getValue());
}
Aggregations