Stats implements GazeMotionListener { static void saveImageAsPng(final BufferedImage bufferedImage, final File outputFile) { try { ImageIO.write(bufferedImage, "png", outputFile); } catch (final IOException e) { throw new RuntimeException(e); } } Stats(final Scene gameContextScene);  Stats(final Scene gameContextScene, final String gameName); ArrayList<TargetAOI> getTargetAOIList(); void setTargetAOIList(final ArrayList<TargetAOI> targetAOIList); void notifyNewRoundReady(); void notifyNextRound(); void startVideoRecording(); void endVideoRecording(); void start(); List<CoordinatesTracker> getMovementHistoryWithTime(); void reset(); void stop(); @Override void gazeMoved(final javafx.geometry.Point2D position); Graphics initGazeMetricsImage(BufferedImage bImage, BufferedImage screenshotImage); SavedStatsInfo saveStats(); long computeRoundsDurationAverageDuration(); long getStartTime(); long computeRoundsDurationMedianDuration(); long getRoundsTotalAdditiveDuration(); long computeTotalElapsedDuration(); double computeRoundsDurationVariance(); double computeRoundsDurationStandardDeviation(); void incrementNumberOfGoalsToReach(); void incrementNumberOfGoalsToReach(int i); void incrementNumberOfGoalsReached(); void addRoundDuration(); int getShotRatio(); List<Long> getSortedDurationsBetweenGoals(); List<Long> getOriginalDurationsBetweenGoals(); String getDirectoryOfVideo(); void takeScreenShot(); final Scene gameContextScene; @Getter
    public int nbGoalsReached; }
@Test void shouldSaveImageAsPNG() { BufferedImage image = new BufferedImage(30, 40, BufferedImage.TYPE_INT_RGB); File testFile = new File("testImage.png"); Stats.saveImageAsPng(image, testFile); assertTrue(testFile.isFile()); testFile.delete(); }