2 * Copyright (c) 2015 Tata Consultancy Services. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.neutron.spi;
11 import javax.xml.bind.JAXBException;
12 import org.junit.Assert;
13 import org.junit.Test;
15 public class NeutronIPsJAXBTest {
17 private static final String NEUTRON_IPS_SOURCE_JSON =
18 "{ \"ip_address\": \"192.168.111.3\", " + "\"subnet_id\": \"22b44fc2-4ffb-4de4-b0f9-69d58b37ae27\" }";
21 public void test_NeutronIPs_JAXB() throws JAXBException {
22 NeutronIPs neutronObject = new NeutronIPs();
23 NeutronIPs testObject = (NeutronIPs) JaxbTestHelper.jaxbUnmarshall(neutronObject, NEUTRON_IPS_SOURCE_JSON);
25 Assert.assertEquals("NeutronIPs JAXB Test 1: Testing ip_address failed", "192.168.111.3",
26 testObject.getIpAddress());
28 Assert.assertEquals("NeutronIPs JAXB Test 2: Testing subnet_id failed",
29 "22b44fc2-4ffb-4de4-b0f9-69d58b37ae27", testObject.getSubnetUUID());