@Test
    public void testSimpleSort() {
        Geometry g = new Geometry("test", new Mesh());
        LightList list = new LightList(g);
        
        list.add(new SpotLight(Vector3f.ZERO, Vector3f.UNIT_X));
        list.add(new PointLight(Vector3f.UNIT_X));
        list.add(new DirectionalLight(Vector3f.UNIT_X));
        list.add(new AmbientLight());
        
        list.sort(true);
        
        assert list.get(0) instanceof AmbientLight;     // Ambients always first
        assert list.get(1) instanceof DirectionalLight; // ... then directionals
        assert list.get(2) instanceof SpotLight;        // Spot is 0 units away from geom
        assert list.get(3) instanceof PointLight;       // ... and point is 1 unit away.
    }
Test light sorting (in the scene graph) for various light types.

@author Kirill Vainer
jme3-core/src/test/java/com/jme3/light/LightSortTest.java