@Test
public void testDecode_AlternatingBits() throws Exception {

    byte[] payload = {
        0x01, 0x23, 0x45, 0x67, (byte) 0x89, (byte) 0xab,
        (byte) 0xcd, (byte) 0xef, 0x01, 0x23, 0x45, 0x67,
        (byte)0x86, (byte)0xdd, // Ethernet EtherType
        0x60, // Version = 6,  DSCP = 0
        (byte)0x30, 0x00, 0x00, // ECN = 3, FlowLabel = 0
        0x00, 0x07, // Length = 7
        0x06, // NextHeader = TCP
        (byte)0x0f, // HopLimit = 15
        0x01, 0x23, 0x45, 0x67, (byte)0x89, (byte)0xab, (byte)0xcd, (byte)0xef, // Src IP Address (part1)
        (byte)0xfe, (byte)0xdc, (byte)0xba, (byte)0x98, 0x76, 0x54, 0x32, 0x10, // Src IP Address (part2)
        (byte)0xfe, (byte)0xdc, (byte)0xba, (byte)0x98, 0x76, 0x54, 0x32, 0x10, // Dest IP Address (part1)
        0x01, 0x23, 0x45, 0x67, (byte)0x89, (byte)0xab, (byte)0xcd, (byte)0xef, // Dest IP Address (part2)
        0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // Data
        (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff // Ethernet Crc
    };
    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(3, ipv6Packet.getEcn().intValue());
    assertEquals(0, ipv6Packet.getFlowLabel().intValue());
    assertEquals(7, ipv6Packet.getIpv6Length().intValue());
    assertEquals(KnownIpProtocols.Tcp, ipv6Packet.getNextHeader());
    assertEquals(15, ipv6Packet.getHopLimit().intValue());
    assertEquals("123:4567:89ab:cdef:fedc:ba98:7654:3210", ipv6Packet.getSourceIpv6().getValue());
    assertEquals("fedc:ba98:7654:3210:123:4567:89ab:cdef", ipv6Packet.getDestinationIpv6().getValue());
    assertNull(ipv6Packet.getExtensionHeaders());
    assertEquals(54, ipv6Packet.getPayloadOffset().intValue());
    assertEquals(7, ipv6Packet.getPayloadLength().intValue());
    assertTrue(Arrays.equals(payload, notification.getPayload()));
}