MainWindowController { private DashboardData getData() { return new DashboardData( dashboard, new WindowGeometry(root.getScene().getWindow()) ); }  void setDashboard(DashboardData dashboardData); @FXML void close(); @FXML void save(); @FXML void newLayout(); @FXML void load(); void load(File saveFile); @FXML void showPrefs();  }
@Test @Tag("NonHeadlessTests") public void testNetworkTableSourceContextMenu() { NetworkTableInstance inst = NetworkTableInstance.getDefault(); inst.getEntry("/testSourceContextMenu").setString("value"); inst.waitForEntryListenerQueue(-1.0); WaitForAsyncUtils.waitForFxEvents(); rightClickOn(TextMatchers.hasText("testSourceContextMenu")); Node showAsText = lookup(TextMatchers.hasText("Show as: Text View")).query(); assertNotNull(showAsText); clickOn(showAsText); WidgetTile tile = lookup(".tile").query(); assertNotNull(tile); Widget widget = tile.getContent(); DataSource source = widget.getSources().get(0); assertTrue(source.isActive()); assertEquals("testSourceContextMenu", source.getName()); assertEquals("value",source.getData()); }