@Test
void decodeEntryTooShortForContentLength() {

  ByteBuf fakeEntry = Unpooled.buffer();
  fakeEntry.writeByte(1);
  fakeEntry.writeCharSequence("w", CharsetUtil.US_ASCII);
  NumberUtils.encodeUnsignedMedium(fakeEntry, 456);
  fakeEntry.writeChar('w');
  assertThatIllegalStateException()
      .isThrownBy(() -> decodeMimeAndContentBuffersSlices(fakeEntry, 0, false));
}