public static Deserializer<LacpBaseTlv> deserializer() {
        return (data, offset, length) -> {
            checkInput(data, offset, length, LENGTH - HEADER_LENGTH);

            LacpBaseTlv lacpBaseTlv = new LacpBaseTlv();
            ByteBuffer bb = ByteBuffer.wrap(data, offset, length);

            lacpBaseTlv.setSystemPriority(bb.getShort());
            byte[] mac = new byte[6];
            bb.get(mac);
            lacpBaseTlv.setSystemMac(MacAddress.valueOf(mac));
            lacpBaseTlv.setKey(bb.getShort());
            lacpBaseTlv.setPortPriority(bb.getShort());
            lacpBaseTlv.setPort(bb.getShort());
            lacpBaseTlv.setState(bb.get());

            return lacpBaseTlv;
        };
    }
@Test
    public void deserializer() throws Exception {
        LacpBaseTlv actorInfo = LacpBaseTlv.deserializer().deserialize(data, 0, data.length);
        assertEquals(SYS_PRIORITY, actorInfo.getSystemPriority());
        assertEquals(SYS_MAC, actorInfo.getSystemMac());
        assertEquals(KEY, actorInfo.getKey());
        assertEquals(PORT_PRIORITY, actorInfo.getPortPriority());
        assertEquals(PORT, actorInfo.getPort());
        assertEquals(STATE, actorInfo.getState().toByte());
    }