@Override
            protected void initialize(Application app){
                Vector3f lightDir = new Vector3f(-4.9236743f, -1.27054665f, 5.896916f);
                SimpleApplication simpleApplication = ((SimpleApplication)app);
                Node rootNode = simpleApplication.getRootNode();
                AssetManager assetManager = simpleApplication.getAssetManager();

                Node mainScene = new Node("Main Scene");
                rootNode.attachChild(mainScene);

                createTerrain(mainScene, assetManager);
                DirectionalLight sun = new DirectionalLight();
                sun.setDirection(lightDir);
                sun.setColor(ColorRGBA.White.clone().multLocal(1f));
                mainScene.addLight(sun);

                AmbientLight al = new AmbientLight();
                al.setColor(new ColorRGBA(0.1f, 0.1f, 0.1f, 1.0f));
                mainScene.addLight(al);


                simpleApplication.getCamera().setLocation(new Vector3f(-370.31592f, 182.04016f, 196.81192f));
                simpleApplication.getCamera().setRotation(new Quaternion(0.10058216f, 0.51807004f, -0.061508257f, 0.8471738f));

                Spatial sky = SkyFactory.createSky(assetManager,
                        "Scenes/Beach/FullskiesSunset0068.dds", EnvMapType.CubeMap);
                sky.setLocalScale(350);

                mainScene.attachChild(sky);
                simpleApplication.getCamera().setFrustumFar(4000);

                //Water Filter
                WaterFilter water = new WaterFilter(rootNode, lightDir);
                water.setWaterColor(new ColorRGBA().setAsSrgb(0.0078f, 0.3176f, 0.5f, 1.0f));
                water.setDeepWaterColor(new ColorRGBA().setAsSrgb(0.0039f, 0.00196f, 0.145f, 1.0f));
                water.setUnderWaterFogDistance(80);
                water.setWaterTransparency(0.12f);
                water.setFoamIntensity(0.4f);
                water.setFoamHardness(0.3f);
                water.setFoamExistence(new Vector3f(0.8f, 8f, 1f));
                water.setReflectionDisplace(50);
                water.setRefractionConstant(0.25f);
                water.setColorExtinction(new Vector3f(30, 50, 70));
                water.setCausticsIntensity(0.4f);
                water.setWaveScale(0.003f);
                water.setMaxAmplitude(2f);
                water.setFoamTexture((Texture2D) assetManager.loadTexture("Common/MatDefs/Water/Textures/foam2.jpg"));
                water.setRefractionStrength(0.2f);
                //0.8f;
                float initialWaterHeight = 90f;
                water.setWaterHeight(initialWaterHeight);

                //Bloom Filter
                BloomFilter bloom = new BloomFilter();
                bloom.setExposurePower(55);
                bloom.setBloomIntensity(1.0f);

                //Light Scattering Filter
                LightScatteringFilter lsf = new LightScatteringFilter(lightDir.mult(-300));
                lsf.setLightDensity(0.5f);

                //Depth of field Filter
                DepthOfFieldFilter dof = new DepthOfFieldFilter();
                dof.setFocusDistance(0);
                dof.setFocusRange(100);

                FilterPostProcessor fpp = new FilterPostProcessor(assetManager);

                fpp.addFilter(water);
                fpp.addFilter(bloom);
                fpp.addFilter(dof);
                fpp.addFilter(lsf);
                fpp.addFilter(new FXAAFilter());

                int numSamples = simpleApplication.getContext().getSettings().getSamples();
                if (numSamples > 0) {
                    fpp.setNumSamples(numSamples);
                }
                simpleApplication.getViewPort().addProcessor(fpp);
            }
This test creates a scene with a terrain and post process water filter.
jme3-screenshot-tests/src/test/java/org/jmonkeyengine/screenshottests/water/TestPostWater.java