@Test
public void test () throws Exception {

  ExecutorService executorService = Executors.newSingleThreadExecutor();
  executorService.execute(() -> Main.main(null));
  SECONDS.sleep(2);
  try (Node node = Nodes.singleNode("test@localhost", true)) {
    Mailbox mailbox = node.mailbox()
        .build();
    Pojo request = new Pojo(
        mailbox.getPid(),
        "Artem",
        27,
        true,
        543,
        asList("java", "nim", "elixir"),
        "developer",
        singleton("popa"),
        "some long string...or not",
        new Boolean[] { true, false, true }
    );
    ErlangTerm requestTerm = TermMapper.serialize(request);
    mailbox.send("java@localhost", "my_process", requestTerm);
    ErlangTerm responseTerm = mailbox.receive(20, SECONDS).getBody();
    Pojo response = TermMapper.deserialize(responseTerm, Pojo.class);
    assertThat(response).isEqualTo(request);
  }
}