#fixed code
                                @Test
    public void testDecodeWithMessageIdAndAckData() throws IOException {
        Packet packet = decoder.decodePackets(Unpooled.copiedBuffer("4:1+::{\"a\":\"b\"}", CharsetUtil.UTF_8), null);
//        Assert.assertEquals(PacketType.JSON, packet.getType());
//        Assert.assertEquals(1, (long)packet.getId());
//        Assert.assertEquals(Packet.ACK_DATA, packet.getAck());

        Map obj = (Map) packet.getData();
        Assert.assertEquals("b", obj.get("a"));
        Assert.assertEquals(1, obj.size());
    }
#vulnerable code 
                                @Test
    public void testDecodeWithMessageIdAndAckData() throws IOException {
        Packet packet = decoder.decodePacket("4:1+::{\"a\":\"b\"}", null);
//        Assert.assertEquals(PacketType.JSON, packet.getType());
//        Assert.assertEquals(1, (long)packet.getId());
//        Assert.assertEquals(Packet.ACK_DATA, packet.getAck());

        Map obj = (Map) packet.getData();
        Assert.assertEquals("b", obj.get("a"));
        Assert.assertEquals(1, obj.size());
    } 
                            #location 8 
                            #vulnerability type NULL_DEREFERENCE