@Test
public void menuItemTest() {

  CompletableFuture<Boolean> future = new CompletableFuture<>();
  MenuItem menuItem = FxUtils.menuItem("Test item", event -> future.complete(true));
  menuItem.fire();
  assertTimeoutPreemptively(Duration.ofSeconds(5), future::join);
}