@Test
public void newInstance () {

  val node = "popa@localhost";
  val id = 500;
  val creation = 42;
  val bytes = Bytes.resizableArray()
      .write1B(PORT.getCode())
      .writeNB(new ErlangAtom(node).toBytes())
      .write4B(id & 0xFFFFFFF)
      .write1B(creation & 0x3)
      .arrayCopy();
  ErlangPort port = ErlangTerm.newInstance(wrappedBuffer(bytes));
  assertThat(port).isNotNull();
  SoftAssertions.assertSoftly(softly -> {
    softly.assertThat(port.getDescriptor().getFullName())
        .isEqualTo(node);
    softly.assertThat(port.getId())
        .isEqualTo(id & 0xFFFFFFF);
    softly.assertThat(port.getCreation())
        .isEqualTo(creation & 0x3);
  });
}