@ParameterizedTest(name = "{0}")
    @MethodSource("testParameters")
    public void testPBRSimple(String testName, boolean realtimeBaking, TestInfo testInfo) {
        if(!testInfo.getTestClass().isPresent() || !testInfo.getTestMethod().isPresent()) {
            throw new RuntimeException("Test preconditions not met");
        }

        String imageName = testInfo.getTestClass().get().getName() + "." + testInfo.getTestMethod().get().getName() + "_" + testName;

        screenshotTest(new BaseAppState() {
            private int frame = 0;
            
            @Override
            protected void initialize(Application app) {
                Camera cam = app.getCamera();
                cam.setLocation(new Vector3f(18, 10, 0));
                cam.lookAt(new Vector3f(0, 0, 0), Vector3f.UNIT_Y);

                AssetManager assetManager = app.getAssetManager();
                SimpleApplication simpleApp = (SimpleApplication) app;
                
                // Create the tank model
                Geometry model = (Geometry) assetManager.loadModel("Models/Tank/tank.j3o");
                MikktspaceTangentGenerator.generate(model);

                Material pbrMat = assetManager.loadMaterial("Models/Tank/tank.j3m");
                model.setMaterial(pbrMat);
                simpleApp.getRootNode().attachChild(model);

                // Create sky
                Spatial sky = SkyFactory.createSky(assetManager, "Textures/Sky/Path.hdr", SkyFactory.EnvMapType.EquirectMap);
                simpleApp.getRootNode().attachChild(sky);

                // Create baker control
                EnvironmentProbeControl envProbe = new EnvironmentProbeControl(assetManager, 256);
                simpleApp.getRootNode().addControl(envProbe);
                
                // Tag the sky, only the tagged spatials will be rendered in the env map
                envProbe.tag(sky);
            }

            @Override
            protected void cleanup(Application app) {}

            @Override
            protected void onEnable() {}

            @Override
            protected void onDisable() {}

            @Override
            public void update(float tpf) {
                if (realtimeBaking) {
                    frame++;
                    if (frame == 2) {
                        SimpleApplication simpleApp = (SimpleApplication) getApplication();
                        simpleApp.getRootNode().getControl(EnvironmentProbeControl.class).rebake();
                    }
                }
            }
        }).setBaseImageFileName(imageName)
          .setFramesToTakeScreenshotsOn(10)
          .run();
    }
Test PBR simple with different parameters

@param testName The name of the test (used for screenshot filename)
@param realtimeBaking Whether to use realtime baking
jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/light/pbr/TestPBRSimple.java