### Question:
Panes { public static <T extends Pane> CompletionStage<T> setContent(final T parent, final Node content) { return FxAsync.doOnFxThread(parent, parentNode -> { parentNode.getChildren().clear(); parentNode.getChildren().add(content); }); } private  Panes(); static CompletionStage<T> setContent(final T parent, final Node content);  }### Answer:
@Test public void setContent() { assertThat(container.getChildren()) .hasSize(1) .hasOnlyElementsOfType(Button.class); embedded = new Pane(); Panes.setContent(container, embedded) .whenCompleteAsync((res, err) -> { assertThat(err).isNull(); assertThat(res).isNotNull(); assertThat(res).isEqualTo(container); assertThat(container.getChildren()) .hasSize(1) .hasOnlyElementsOfType(embedded.getClass()); }); }