2 * Copyright (c) 2013 Cisco Systems, Inc. and others. 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
8 package org.opendaylight.protocol.concepts;
10 import org.junit.Assert;
11 import org.junit.Test;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.nps.concepts.rev130930.IsoSystemIdentifier;
14 public class ISOSystemIdentifierTest {
16 @Test(expected = IllegalArgumentException.class)
17 public void testISOSystemIdentifier() {
18 final byte[] b = new byte[] { 10, 12, 127, 0, 9, 1, 1 };
19 new IsoSystemIdentifier(b);
23 public void testGetBytes() {
24 final byte[] b = new byte[] { 10, 12, 127, 0, 9, 1 };
25 final IsoSystemIdentifier id = new IsoSystemIdentifier(b);
26 Assert.assertArrayEquals(new byte[] { 10, 12, 127, 0, 9, 1 }, id.getValue());