#vulnerable code 
                                @Test
    public void testDecodeWithIdAndEndpoint() throws IOException {
        Packet packet = decoder.decodePacket("3:5:/tobi", null);
        Assert.assertEquals(PacketType.MESSAGE, packet.getType());
//        Assert.assertEquals(5, (long)packet.getId());
//        Assert.assertEquals(true, packet.getAck());
        Assert.assertEquals("/tobi", packet.getNsp());
    } 
                            #location 4 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void testDecodeWithIdAndEndpoint() throws IOException {
        Packet packet = decoder.decodePackets(Unpooled.copiedBuffer("3:5:/tobi", CharsetUtil.UTF_8), null);
        Assert.assertEquals(PacketType.MESSAGE, packet.getType());
//        Assert.assertEquals(5, (long)packet.getId());
//        Assert.assertEquals(true, packet.getAck());
        Assert.assertEquals("/tobi", packet.getNsp());
    }