Merge "Do not force toString() in NetconfClientSession"
[controller.git] / opendaylight / netconf / netconf-util / src / test / java / org / opendaylight / controller / netconf / util / messages / NetconfMessageHeaderTest.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.controller.netconf.util.messages;
10
11 import static org.junit.Assert.assertArrayEquals;
12 import static org.junit.Assert.assertEquals;
13
14 import com.google.common.base.Charsets;
15 import org.junit.Test;
16
17 @Deprecated
18 public class NetconfMessageHeaderTest {
19     @Test
20     public void testGet() throws Exception {
21         NetconfMessageHeader header = new NetconfMessageHeader(10);
22         assertEquals(header.getLength(), 10);
23
24         byte[] expectedValue = "\n#10\n".getBytes(Charsets.US_ASCII);
25         assertArrayEquals(expectedValue, header.toBytes());
26     }
27 }