private void attachRandomGeometry(Node node, Material mat) {
        Box box = new Box(0.25f, 0.25f, 0.25f);
        Torus torus = new Torus(16, 16, 0.2f, 0.8f);
        Geometry[] boxes = new Geometry[]{
            new Geometry("box1", box),
            new Geometry("box2", box),
            new Geometry("box3", box),
            new Geometry("torus1", torus),
            new Geometry("torus2", torus),
            new Geometry("torus3", torus)
        };
        for (int i = 0; i < boxes.length; i++) {
            Geometry geometry = boxes[i];
            geometry.setLocalTranslation((float) Math.random() * 10 -10, (float) Math.random() * 10 -10, (float) Math.random() * 10 -10);
            geometry.setLocalRotation(new Quaternion().fromAngles((float) Math.random() * FastMath.PI, (float) Math.random() * FastMath.PI, (float) Math.random() * FastMath.PI));
            geometry.setLocalScale((float) Math.random() * 10 -10, (float) Math.random() * 10 -10, (float) Math.random() * 10 -10);
            geometry.setMaterial(mat);
            node.attachChild(geometry);
        }
    }
This is a basic Test of jbullet-jme functions

@author normenhansen
jme3-examples/src/main/java/jme3test/bullet/TestCollisionShapeFactory.java