#vulnerable code 
                                @Test
    public void testDecodeWithQueryString() throws IOException {
        Packet packet = decoder.decodePacket("1::/test:?test=1", null);
        Assert.assertEquals(PacketType.CONNECT, packet.getType());
        Assert.assertEquals("/test", packet.getNsp());
//        Assert.assertEquals("?test=1", packet.getQs());
    } 
                            #location 4 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void testDecodeWithQueryString() throws IOException {
        Packet packet = decoder.decodePackets(Unpooled.copiedBuffer("1::/test:?test=1", CharsetUtil.UTF_8), null);
        Assert.assertEquals(PacketType.CONNECT, packet.getType());
        Assert.assertEquals("/test", packet.getNsp());
//        Assert.assertEquals("?test=1", packet.getQs());
    }