assertEquals(copy, copy2);
}
@Test
public void testCreateBuffers() throws Exception {
Buffer buff = Buffer.buffer(1000);
assertEquals(0, buff.length());
String str = TestUtils.randomUnicodeString(100);
buff = Buffer.buffer(str);
assertEquals(buff.length(), str.getBytes("UTF-8").length);
assertEquals(str, buff.toString());
// TODO create with string with encoding
byte[] bytes = TestUtils.randomByteArray(100);
buff = Buffer.buffer(bytes);
assertEquals(buff.length(), bytes.length);
assertEquals(Buffer.buffer(bytes), Buffer.buffer(buff.getBytes()));
}