private static void attachImage(String title, String fileName, BufferedImage originalImage) throws IOException{
        ExtentTest test = ExtentReportExtension.getCurrentTest();
        ImageIO.write(originalImage, "png", Paths.get("build/reports/" + fileName).toFile());
        test.addScreenCaptureFromPath(fileName, title);
    }
Attaches the image to the report. The image is written to the report directory
jme3-screenshot-tests/src/main/java/org/jmonkeyengine/screenshottests/testframework/TestDriver.java