@Test
public void newInstance () {

  val value = new byte[] { 1, 2, 3 };
  val pad = 3;
  val bytes = Bytes.resizableArray()
      .write1B(BIT_BINNARY.getCode())
      .write4B(value.length)
      .write1B(8 - pad)
      .writeNB(value)
      .arrayCopy();
  ErlangBitString bitString = ErlangTerm.newInstance(wrappedBuffer(bytes));
  assertThat(bitString).isNotNull();
  SoftAssertions.assertSoftly(softly -> {
    softly.assertThat(bitString.getBits())
        .isEqualTo(new byte[] { 1, 2, 0 });
    softly.assertThat(bitString.getPad())
        .isEqualTo(3);
  });
}