StatDisplayUtils { static void returnToMenu(GazePlay gazePlay, StatsContext statsContext) { statsContext.getRoot().setCursor(Cursor.WAIT); BackgroundMusicManager.getInstance().restorePlaylist(); BackgroundMusicManager.getInstance().previous(); gazePlay.onReturnToMenu(); statsContext.getRoot().setCursor(Cursor.DEFAULT); }  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 shouldSetTheCursorWhenPressed() { StatDisplayUtils.returnToMenu(gazePlay, mockStatsContext); verify(mockStatsContext.getRoot(), times(2)).setCursor(captor.capture()); assertTrue(captor.getAllValues().contains(Cursor.WAIT)); assertTrue(captor.getAllValues().contains(Cursor.DEFAULT)); }