-/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */\r
-package org.opendaylight.openflowjava.protocol.impl.core;\r
-\r
-import io.netty.buffer.ByteBuf;\r
-import io.netty.channel.embedded.EmbeddedChannel;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.opendaylight.openflowjava.protocol.impl.core.TcpHandler;\r
-import org.opendaylight.openflowjava.protocol.impl.core.TlsDetector;\r
-import org.opendaylight.openflowjava.protocol.impl.core.TcpHandler.COMPONENT_NAMES;\r
-\r
-/**\r
- *\r
- * @author michal.polkorab\r
- */\r
-public class TlsDetectorTest {\r
- \r
- private EmbeddedChannel embch;\r
-\r
- /**\r
- * Sets up test environment\r
- */\r
- @Before\r
- public void setUp() {\r
- TlsDetector tlsDetector = new TlsDetector();\r
- embch = new EmbeddedChannel(new DummyDecoder());\r
- embch.pipeline().addFirst(TcpHandler.COMPONENT_NAMES.TLS_DETECTOR.name(), tlsDetector);\r
- }\r
-\r
- /**\r
- * Test of decode {@link TlsDetector#decode(io.netty.channel.ChannelHandlerContext, io.netty.buffer.ByteBuf, java.util.List) }\r
- * @throws Exception \r
- */\r
- @Test\r
- public void testDecodeNotEncryptedMessage() throws Exception {\r
- byte[] msgs = new byte[]{0x04, 0x0, 0x0, 0x08, 0x0, 0x0, 0x0, 0x01};\r
- ByteBuf writeObj = embch.alloc().buffer(64);\r
- writeObj.writeBytes(msgs);\r
- embch.writeInbound(writeObj);\r
-\r
- Assert.assertNull(embch.pipeline().get(COMPONENT_NAMES.TLS_DETECTOR.name()));\r
- Assert.assertNull(embch.pipeline().get(COMPONENT_NAMES.SSL_HANDLER.name()));\r
- }\r
+/*
+ * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.openflowjava.protocol.impl.core;
+
+import io.netty.buffer.ByteBuf;
+import io.netty.channel.embedded.EmbeddedChannel;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.opendaylight.openflowjava.protocol.impl.core.TcpHandler.COMPONENT_NAMES;
+
+/**
+ *
+ * @author michal.polkorab
+ */
+public class TlsDetectorTest {
+
+ private EmbeddedChannel embch;
+
+ /**
+ * Sets up test environment
+ */
+ @Before
+ public void setUp() {
+ TlsDetector tlsDetector = new TlsDetector();
+ embch = new EmbeddedChannel(new DummyDecoder());
+ embch.pipeline().addFirst(TcpHandler.COMPONENT_NAMES.TLS_DETECTOR.name(), tlsDetector);
+ }
+
+ /**
+ * Test of decode {@link TlsDetector#decode(io.netty.channel.ChannelHandlerContext, io.netty.buffer.ByteBuf, java.util.List) }
+ * @throws Exception
+ */
+ @Test
+ public void testDecodeNotEncryptedMessage() throws Exception {
+ byte[] msgs = new byte[]{0x04, 0x0, 0x0, 0x08, 0x0, 0x0, 0x0, 0x01};
+ ByteBuf writeObj = embch.alloc().buffer(64);
+ writeObj.writeBytes(msgs);
+ embch.writeInbound(writeObj);
+
+ Assert.assertNull(embch.pipeline().get(COMPONENT_NAMES.TLS_DETECTOR.name()));
+ Assert.assertNull(embch.pipeline().get(COMPONENT_NAMES.SSL_HANDLER.name()));
+ }
}
\ No newline at end of file