@Test
public void writeToOutputStreamIsNotSupported() {

    // given
    ByteBufHttpEntity entity = new ByteBufHttpEntity(createDefaultTestByteBuf(), 0, null);
    expectedException.expect(UnsupportedOperationException.class);
    // when
    entity.writeTo(new ByteArrayOutputStream());
}