+
+ @Test
+ public void testGetMatchFullPacket() throws Exception {
+ IEEE8021Q dot1q = new IEEE8021Q();
+ byte priority = 4;
+ short vlanId = 59;
+ short ethType = EtherTypes.IPv4.shortValue();
+ dot1q.setPcp(priority);
+ dot1q.setVid(vlanId);
+ dot1q.setEtherType(ethType);
+
+ Match match = dot1q.getMatch();
+
+ Assert.assertEquals(priority, (byte) match.getField(MatchType.DL_VLAN_PR).getValue());
+ Assert.assertEquals(vlanId, (short) match.getField(MatchType.DL_VLAN).getValue());
+ Assert.assertEquals(ethType, (short) match.getField(MatchType.DL_TYPE).getValue());
+ }