@Test
    public void testCloneRenderState() {
        for (RenderState.BlendEquation equation : RenderState.BlendEquation.values()) {
            testObject.setBlendEquation(equation);
            test();
        }

        for (RenderState.BlendEquationAlpha eqAlpha : RenderState.BlendEquationAlpha.values()) {
            testObject.setBlendEquationAlpha(eqAlpha);
            test();
        }

        for (RenderState.BlendMode mode : RenderState.BlendMode.values()) {
            testObject.setBlendMode(mode);
            test();
        }

        testObject.setColorWrite(true);
        test();
        testObject.setColorWrite(false);
        test();

        testCustomBlendFactors();

        for (RenderState.TestFunction function : RenderState.TestFunction.values()) {
            testObject.setDepthFunc(function);
            test();
        }

        testObject.setDepthTest(true);
        test();
        testObject.setDepthTest(false);
        test();

        testObject.setDepthWrite(true);
        test();
        testObject.setDepthWrite(false);
        test();

        for (RenderState.FaceCullMode mode : RenderState.FaceCullMode.values()) {
            testObject.setFaceCullMode(mode);
            test();
        }

        testObject.setLineWidth(1f);
        test();
        testObject.setLineWidth(9f);
        test();

        for (int factor = -1; factor <= 1; ++factor) {
            for (int units = -1; units <= 1; ++units) {
                testObject.setPolyOffset(factor, units);
                test();
            }
        }

        testStencils();

        testObject.setWireframe(true);
        test();
        testObject.setWireframe(false);
        test();
    }
Test cloning/saving/loading a RenderState. Related issues include #1718 and
#1723.

@author Stephen Gold sgold@sonic.net
jme3-core/src/test/java/com/jme3/material/RenderStateTest.java