2 * Copyright (c) 2013 Pantheon Technologies s.r.o. 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
9 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
11 import io.netty.buffer.ByteBuf;
13 import org.junit.Test;
14 import org.opendaylight.openflowjava.protocol.impl.util.BufferHelper;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.BarrierOutput;
18 * @author michal.polkorab
19 * @author timotej.kubas
21 public class BarrierReplyMessageFactoryTest {
24 * Testing of {@link BarrierReplyMessageFactory} for correct translation into POJO
28 ByteBuf bb = BufferHelper.buildBuffer();
29 BarrierOutput builtByFactory = BufferHelper.decodeV13(
30 BarrierReplyMessageFactory.getInstance(), bb);
32 BufferHelper.checkHeaderV13(builtByFactory);
36 * Testing of {@link BarrierReplyMessageFactory} for correct translation into POJO
39 public void testV10() {
40 ByteBuf bb = BufferHelper.buildBuffer();
41 BarrierOutput builtByFactory = BufferHelper.decodeV10(
42 BarrierReplyMessageFactory.getInstance(), bb);
44 BufferHelper.checkHeaderV10(builtByFactory);