@Override
    public Properties decode(ByteBuf buf, State state) {
        String value = buf.toString(CharsetUtil.UTF_8);
        Properties result = new Properties();
        for (String entry : value.split("\n")) {
            if (entry.length() < 2) {
                continue;
            }
            String[] pair = entry.split(":");
            if (pair.length != 2 || pair[0].length() == 0 ) {
                continue;
            }
            String second = pair[1];
            if (second.charAt(second.length() - 1) == '\r') {
                second = second.substring(0, second.length() - 1);
            }
            result.put(pair[0], second);
        }
        return result;
    }
@Test
    public void testDecode() {
        Properties p = decoder.decode(Unpooled.copiedBuffer(info, StandardCharsets.UTF_8), null);
        Assert.assertEquals(p.getProperty("redis_version"), "5.0.10");
        Assert.assertEquals(p.getProperty("redis_mode"), "standalone");
        Assert.assertNull(p.getProperty("config_file"));
    }