@Test
public void setsContentLength() {

    // given
    long expectedContentLength = new Random().nextInt(1000);
    ByteBufHttpEntity entity = new ByteBufHttpEntity(createDefaultTestByteBuf(), expectedContentLength, null);
    // when
    long contentLength = entity.getContentLength();
    // then
    assertEquals(expectedContentLength, contentLength);
}