### Question:
Buttons { public static void setOnClick(final Button button, final Runnable action) { button.setOnAction(e -> Platform.runLater(action)); } private  Buttons(); static void setOnClick(final Button button, final Runnable action); static void setOnClickWithNode(final Button button, final Node node, final Consumer<Node> action);  }### Answer:
@Test public void setOnClick() { final AtomicBoolean success = new AtomicBoolean(false); final Button testButton = new Button("TEST_BUTTON"); Buttons.setOnClick(testButton, () -> success.set(true)); withNodes(testButton) .startWhen(() -> point(testButton).query() != null) .willDo(() -> clickOn(testButton, PRIMARY)) .andAwaitFor(success::get); assertThat(success).isTrue(); }