ConfigurationContext extends GraphicalContext<BorderPane> { static CheckBox buildCheckBox(BooleanProperty selectionProperty) { CheckBox checkBox = new CheckBox(); checkBox.setSelected(selectionProperty.getValue()); checkBox.selectedProperty().bindBidirectional(selectionProperty); return checkBox; } ConfigurationContext(GazePlay gazePlay); @Override ObservableList<Node> getChildren();  }
@Test void shouldBuildCheckBox() throws InterruptedException { BooleanProperty testProperty = new SimpleBooleanProperty(true); CheckBox result = ConfigurationContext.buildCheckBox(testProperty); assertTrue(result.isSelected()); Platform.runLater(result::fire); TestingUtils.waitForRunLater(); assertFalse(testProperty.getValue()); }