@Override
            public void run() {
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException ex) {
                }
                
                // begin randomly changing textures after 1 sec.
                while (true) {
                    for (Spatial child : rootNode.getChildren()) {
                        Geometry g = (Geometry) (((Node)child).getChild(0));
                        Material m = g.getMaterial();
                        Texture curTex = m.getTextureParam("ColorMap").getTextureValue();
                        if (curTex == t1) {
                            m.setTexture("ColorMap", t2);
                        } else {
                            m.setTexture("ColorMap", t1);
                        }
                    }
                }
            }
Changes a material's texture from another thread while it is rendered.
This should trigger the sorting function's inconsistent compare detection.

@author Kirill Vainer
jme3-examples/src/main/java/jme3test/renderer/TestInconsistentCompareDetection.java