@Test
public void testDecode_Udp() throws Exception {

    byte[] payload = {
        // Ethernet start
        0x33, 0x33, 0x00, 0x00, 0x00, (byte)0xfb, (byte)0xa2, (byte)0xe6, (byte)0xda, 0x67, (byte)0xef, (byte)0x95,
        (byte)0x86, (byte)0xdd,
        // IPv6 packet start
        0x60, 0x00, 0x00, 0x00, 0x00, 0x35, 0x11, (byte)0xff, (byte)0xfe, (byte)0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, (byte)0xa0, (byte)0xe6,
        (byte)0xda, (byte)0xff, (byte)0xfe, 0x67, (byte)0xef, (byte)0x95, (byte)0xff, 0x02, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, (byte)0xfb,
        // UDP start
        0x14, (byte)0xe9, 0x14, (byte)0xe9, 0x00, 0x35, 0x6b, (byte)0xd4, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x5f, 0x69, 0x70, 0x70, 0x73,
        0x04, 0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01,
        0x04, 0x5f, 0x69, 0x70, 0x70, (byte)0xc0, 0x12, 0x00, 0x0c, 0x00, 0x01
    };
    NotificationProviderService npServiceMock = Mockito.mock(NotificationProviderService.class);
    ArrayList<PacketChain> packetChainList = new ArrayList<>();
    packetChainList.add(new PacketChainBuilder().setPacket(new RawPacketBuilder().build()).build());
    packetChainList.add(
            new PacketChainBuilder().setPacket(new EthernetPacketBuilder().setPayloadOffset(14).build()).build());
    Ipv6PacketReceived notification = new Ipv6Decoder(npServiceMock).decode(
            new EthernetPacketReceivedBuilder().setPacketChain(packetChainList).setPayload(payload).build());
    Ipv6Packet ipv6Packet = (Ipv6Packet) notification.getPacketChain().get(2).getPacket();
    assertEquals(6, ipv6Packet.getVersion().intValue());
    assertEquals(0, ipv6Packet.getDscp().getValue().intValue());
    assertEquals(0, ipv6Packet.getEcn().intValue());
    assertEquals(0, ipv6Packet.getFlowLabel().intValue());
    assertEquals(53, ipv6Packet.getIpv6Length().intValue());
    assertEquals(KnownIpProtocols.Udp, ipv6Packet.getNextHeader());
    assertEquals(255, ipv6Packet.getHopLimit().intValue());
    assertEquals("fe80:0:0:0:a0e6:daff:fe67:ef95", ipv6Packet.getSourceIpv6().getValue());
    assertEquals("ff02:0:0:0:0:0:0:fb", ipv6Packet.getDestinationIpv6().getValue());
    assertNull(ipv6Packet.getExtensionHeaders());
    assertEquals(54, ipv6Packet.getPayloadOffset().intValue());
    assertEquals(53, ipv6Packet.getPayloadLength().intValue());
    assertTrue(Arrays.equals(payload, notification.getPayload()));
}