prefer to use standard netty bytebuf.toString since now it use cache under the hood
[idea/community.git] / platform / built-in-server / testSrc / ChannelBufferToStringTest.kt
1 package org.jetbrains.io
2
3 import io.netty.buffer.Unpooled
4 import org.assertj.core.api.Assertions.assertThat
5 import org.junit.Test
6
7 internal class ChannelBufferToStringTest {
8   @Test
9   fun readUtf8() {
10     val string = "\ud83d\udd1d"
11     val byteBuffer = Unpooled.copiedBuffer(string, Charsets.UTF_8)
12     assertThat(byteBuffer.readUtf8()).isEqualTo(string)
13   }
14 }