@Test
public void testDecode_IPv6EtherTypeWithQinQ() throws Exception {

    byte[] packet = {
        0x01, 0x23, 0x45, 0x67, (byte) 0x89, (byte) 0xab,
        (byte) 0xcd, (byte) 0xef, 0x01, 0x23, 0x45, 0x67,
        (byte) 0x91, 0x00,
        (byte) 0xff, (byte) 0xff,
        (byte) 0x81, 0x00,
        (byte) 0xa0, (byte) 0x0a,
        (byte) 0x86, (byte) 0xdd,
        0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11,
        (byte)0x0a, (byte)0x0b, (byte)0x0c, (byte)0x0d
    };
    NotificationProviderService mock = Mockito.mock(NotificationProviderService.class);
    EthernetPacketReceived notification = new EthernetDecoder(mock)
            .decode(new PacketReceivedBuilder().setPayload(packet).setMatch(new MatchBuilder().build()).build());
    EthernetPacket ethernetPacket = (EthernetPacket) notification.getPacketChain().get(1).getPacket();
    assertEquals(ethernetPacket.getEthertype(), KnownEtherType.Ipv6);
    assertNull(ethernetPacket.getEthernetLength());
    assertEquals(2, ethernetPacket.getHeader8021q().size());
    assertEquals(Header8021qType.QInQ, ethernetPacket.getHeader8021q().get(0).getTPID());
    assertEquals(7, ethernetPacket.getHeader8021q().get(0).getPriorityCode().intValue());
    assertTrue(ethernetPacket.getHeader8021q().get(0).isDropEligible());
    assertEquals(4095, ethernetPacket.getHeader8021q().get(0).getVlan().getValue().intValue());
    assertEquals(Header8021qType.VlanTagged, ethernetPacket.getHeader8021q().get(1).getTPID());
    assertEquals(5, ethernetPacket.getHeader8021q().get(1).getPriorityCode().intValue());
    assertFalse(ethernetPacket.getHeader8021q().get(1).isDropEligible());
    assertEquals(10, ethernetPacket.getHeader8021q().get(1).getVlan().getValue().intValue());
    assertEquals("01:23:45:67:89:ab", ethernetPacket.getDestinationMac().getValue());
    assertEquals("cd:ef:01:23:45:67", ethernetPacket.getSourceMac().getValue());
    assertEquals(22, ethernetPacket.getPayloadOffset().intValue());
    assertEquals(14, ethernetPacket.getPayloadLength().intValue());
    assertEquals(168496141L, ethernetPacket.getCrc().longValue());
    assertTrue(Arrays.equals(packet, notification.getPayload()));
}