* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.netconf.callhome.mount;
-
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import org.opendaylight.netconf.client.NetconfClientSession;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Host;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
-
+import org.opendaylight.yangtools.yang.common.Uint16;
public class ContextKeyTest {
private IpAddress address1;
@Before
public void setup() {
- address1 = IpAddressBuilder.getDefaultInstance("1.2.3.4");
- address2 = IpAddressBuilder.getDefaultInstance("5.6.7.8");
+ address1 = new IpAddress(new Ipv4Address("1.2.3.4"));
+ address2 = new IpAddress(new Ipv4Address("5.6.7.8"));
- port1 = new PortNumber(123);
- port2 = new PortNumber(456);
+ port1 = new PortNumber(Uint16.valueOf(123));
+ port2 = new PortNumber(Uint16.valueOf(456));
mockNode = mock(NetconfNode.class);
mockSession = mock(NetconfClientSession.class);
// expect
assertTrue(instance1.equals(instance1));
assertFalse(instance1.equals(null));
- assertFalse(instance1.equals(new Long(123456)));
+ assertFalse(instance1.equals(123456L));
assertFalse(instance1.equals(instance2));
assertFalse(instance1.equals(instance3));
assertFalse(instance1.equals(instance4));