2 * Copyright (c) 2017 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.openflowplugin.impl.services.util;
11 import static org.junit.Assert.assertEquals;
12 import static org.junit.Assert.assertFalse;
14 import org.junit.Test;
15 import org.opendaylight.openflowplugin.api.OFConstants;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput;
19 public class RequestInputUtilsTest {
21 public void createMultipartHeader() {
22 final Short version = OFConstants.OFP_VERSION_1_3;
24 final MultipartType type = MultipartType.OFPMPDESC;
26 final MultipartRequestInput input = RequestInputUtils
27 .createMultipartHeader(type, xid, version)
30 assertEquals(version, input.getVersion());
31 assertEquals(xid, input.getXid());
32 assertEquals(type, input.getType());
33 assertFalse(input.getFlags().isOFPMPFREQMORE());