@Test
public void remoteProcedureCall () throws Exception {

  val name = createName();
  node = Nodes.singleNode(name, NodeConfig.builder()
      .shortName(true)
      .cookie("secret")
      .build());
  Mailbox mailbox = node.mailbox().build();
  mailbox.call(ELIXIR_ECHO_SERVER, "erlang", "date");
  Message message = mailbox.receive(5, SECONDS);
  assertThat(message.getHeader())
      .extracting(ControlMessage::getTag)
      .isEqualTo(SEND);
  assertThat(message.getBody())
      .isNotNull();
  ErlangTerm term = message.getBody();
  assertThat(term.isTuple()).isTrue();
  assertThat(term.size()).isEqualTo(2);
  assertThat(term.getUnsafe(0).asText()).isEqualTo("rex");
  assertThat(term.getUnsafe(1).isTuple()).isTrue();
  ErlangTerm response1 = term.getUnsafe(1);
  assertThat(response1.getUnsafe(0).isNumber()).isTrue();
  assertThat(response1.getUnsafe(1).isNumber()).isTrue();
  assertThat(response1.getUnsafe(2).isNumber()).isTrue();
  mailbox.call(ELIXIR_ECHO_SERVER, "erlang", "date");
  ErlangTerm response2 = mailbox.receiveRemoteProcedureResult(5, SECONDS);
  assertThat(response2).isEqualTo(response1);
}