@@ -0,0 +1,761 @@
+package com.yuzhouwan.hacker.netty;%0A%0Aimport io.netty.buffer.ByteBuf;%0Aimport io.netty.buffer.Unpooled;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.nio.charset.StandardCharsets;%0A%0A/**%0A * Copyright @ 2020 yuzhouwan.com%0A * All right reserved.%0A * Function%EF%BC%9ANetty Test%0A *%0A * @author Benedict Jin%0A * @see %3Ca href=%22https://yuzhouwan.com/posts/200316/%22%3ENetty%EF%BC%9A%E4%BB%8E%E5%85%A5%E9%97%A8%E5%88%B0%E5%AE%9E%E8%B7%B5%3C/a%3E%0A * @since 2020/5/7%0A */%0Apublic class NettyTest %7B%0A%0A    @Test%0A    public void string2ByteBuf() %7B%0A        String s = %22yuzhouwan.com%22;%0A        final ByteBuf buf = Unpooled.wrappedBuffer(s.getBytes(StandardCharsets.UTF_8));%0A        byte%5B%5D bytes = new byte%5Bbuf.readableBytes()%5D;%0A        buf.readBytes(bytes);%0A        Assert.assertEquals(s, new String(bytes, StandardCharsets.UTF_8));%0A    %7D%0A%7D%0A

Add a test case about netty