private void addTerrain() {
        int patchSize = 3;
        int mapSize = 3;
        TerrainQuad quad
                = new TerrainQuad("terrain", patchSize, mapSize, nineHeights);
        rootNode.attachChild(quad);
        quad.setMaterial(quadMaterial);

        CollisionShape shape = CollisionShapeFactory.createMeshShape(quad);
        float massForStatic = 0f;
        RigidBodyControl rbc = new RigidBodyControl(shape, massForStatic);
        rbc.setPhysicsSpace(physicsSpace);
        quad.addControl(rbc);
    }
Add 3x3 terrain to the scene and the PhysicsSpace.
jme3-examples/src/main/java/jme3test/bullet/TestIssue1125.java