Remove redundant exception declarations
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / services / util / RequestInputUtilsTest.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.openflowplugin.impl.services.util;
10
11 import static org.junit.Assert.assertEquals;
12 import static org.junit.Assert.assertFalse;
13
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;
18
19 public class RequestInputUtilsTest {
20     @Test
21     public void createMultipartHeader() {
22         final Short version = OFConstants.OFP_VERSION_1_3;
23         final Long xid = 42L;
24         final MultipartType type = MultipartType.OFPMPDESC;
25
26         final MultipartRequestInput input = RequestInputUtils
27                 .createMultipartHeader(type, xid, version)
28                 .build();
29
30         assertEquals(version, input.getVersion());
31         assertEquals(xid, input.getXid());
32         assertEquals(type, input.getType());
33         assertFalse(input.getFlags().isOFPMPFREQMORE());
34     }
35 }