3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.openflow.protocol;
13 import junit.framework.TestCase;
15 import org.junit.Test;
16 import org.openflow.protocol.statistics.OFStatisticsType;
19 public class OFStatisticsTypeTest extends TestCase {
21 public void testMapping() throws Exception {
22 TestCase.assertEquals(OFStatisticsType.DESC,
23 OFStatisticsType.valueOf((short) 0, OFType.STATS_REQUEST));
24 TestCase.assertEquals(OFStatisticsType.QUEUE,
25 OFStatisticsType.valueOf((short) 5, OFType.STATS_REQUEST));
26 TestCase.assertEquals(OFStatisticsType.VENDOR,
27 OFStatisticsType.valueOf((short) 0xffff, OFType.STATS_REQUEST));