@Override
    public void simpleInitApp() {
        timer = new NanoTimer();
        batch = new BatchNode("theBatchNode");

        /*
         * A cube with a color "bleeding" through transparent texture. Uses
         * Texture from jme3-testdata library!
         */
        Box boxShape4 = new Box(1f, 1f, 1f);
        Geometry cube = new Geometry("cube1", boxShape4);
        Material mat = assetManager.loadMaterial("Textures/Terrain/Pond/Pond.j3m");
        cube.setMaterial(mat);
        //Material mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
        //mat.setColor("Diffuse", ColorRGBA.Blue);
        //mat.setBoolean("UseMaterialColors", true);
        /*
         * A cube with a color "bleeding" through transparent texture. Uses
         * Texture from jme3-testdata library!
         */
        Box box = new Box(1f, 1f, 1f);
        cube2 = new Geometry("cube2", box);
        cube2.setMaterial(mat);

        MikktspaceTangentGenerator.generate(cube);
        MikktspaceTangentGenerator.generate(cube2);

        batch.attachChild(cube);
        //  batch.attachChild(cube2);
        //  batch.setMaterial(mat);
        batch.batch();
        rootNode.attachChild(batch);
        cube.setLocalTranslation(3, 0, 0);
        cube2.setLocalTranslation(0, 20, 0);

        updateBoundingPoints(points);
        frustum = new WireFrustum(points);
        Geometry frustumMdl = new Geometry("f", frustum);
        frustumMdl.setCullHint(Spatial.CullHint.Never);
        frustumMdl.setMaterial(new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"));
        frustumMdl.getMaterial().getAdditionalRenderState().setWireframe(true);
        frustumMdl.getMaterial().setColor("Color", ColorRGBA.Red);
        rootNode.attachChild(frustumMdl);
        dl = new DirectionalLight();
        dl.setColor(ColorRGBA.White.mult(2));
        dl.setDirection(new Vector3f(1, -1, -1));
        rootNode.addLight(dl);
        flyCam.setMoveSpeed(10);
    }
A test to demonstrate the usage and functionality of the {@link BatchNode}
@author Nehon
jme3-examples/src/main/java/jme3test/batching/TestBatchNode.java