Refactor DOMDataBrokerImpl
[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 import com.google.common.base.Charsets;
14 import org.junit.Test;
15
16 @Deprecated
17 public class NetconfMessageHeaderTest {
18     @Test
19     public void testGet() throws Exception {
20         NetconfMessageHeader header = new NetconfMessageHeader(10);
21         assertEquals(header.getLength(), 10);
22
23         byte[] expectedValue = "\n#10\n".getBytes(Charsets.US_ASCII);
24         assertArrayEquals(expectedValue, header.toBytes());
25     }
26 }