StatDisplayUtils { public static HomeButton createHomeButtonInStatsScreen(GazePlay gazePlay, StatsContext statsContext) { EventHandler<Event> homeEvent = e -> returnToMenu(gazePlay, statsContext); Dimension2D screenDimension = gazePlay.getCurrentScreenDimensionSupplier().get(); HomeButton homeButton = new HomeButton(screenDimension); homeButton.addEventHandler(MouseEvent.MOUSE_CLICKED, homeEvent); return homeButton; }  static HomeButton createHomeButtonInStatsScreen(GazePlay gazePlay, StatsContext statsContext); static LineChart<String, Number> buildLineChart(Stats stats, final Region root); static AreaChart<Number, Number> buildAreaChart(LinkedList<FixationPoint> points, final Region root); static ImageView buildGazeMetrics(Stats stats, final Region root); static String convert(long totalTime);  }
@Test void shouldCreateHomeButton() { final HomeButton button = StatDisplayUtils.createHomeButtonInStatsScreen(gazePlay, mockStatsContext); assert button.isVisible(); }