@Test
public void newInstance () {

  val value = new ErlangNil();
  val bytes = Bytes.resizableArray()
      .write1B(LIST.getCode())
      .write4B(1)
      .writeNB(value.toBytes())
      .writeNB(new ErlangNil().toBytes())
      .arrayCopy();
  ErlangList list = ErlangTerm.newInstance(wrappedBuffer(bytes));
  assertThat(list).isNotNull();
  SoftAssertions.assertSoftly(softly -> {
    softly.assertThat(list.isCollectionTerm())
        .isTrue();
    softly.assertThat(list.isList())
        .isTrue();
    softly.assertThat(list.get(0))
        .isPresent()
        .hasValue(value);
    softly.assertThat(list.size())
        .isEqualTo(1);
    softly.assertThat(list.getTail())
        .isEqualTo(new ErlangNil());
  });
}